Based on the image above, I've faced some problem when I tried to add this code display:block, but nothing has changed. What is the problem with my text? How can I fix them?
I'm using this reset codes:
http://html5doctor.com/html-5-reset-stylesheet/ And I just set font-size:80px;
.counter-box p
{
font-size: 20px;
}
.counter-box .counter
{
font-size: 80px;
}
Use line height property:
.counter-box .counter
{
font-size: 80px;
line-height:80px;
}
Related
I am using bulma for a css framework and i ran into an interesting learning experience. I am trying to align the nav buttons to the bottom of the red field. However, as you can see they have shifted out of alignment. I have tried to apply an inline css style to them, however that does not correct the issue.
Can anyone point me in the right directory, it would be greatly appreciated.
https://codepen.io/robot43298/pen/WNGENNL
.navbar-end {
.button{
color: white;
font-size: 18px;
border: 2px dashed white;
background-color: red;
}
.dropdown-trigger{
margin-top: 15%;
display: inline;
vertical-align: bottom;
}
& li{
font-size: 16px;
}
}
Try this,
Remove this margin
.navbar-end .dropdown-trigger {
margin-top: 15%; /* Remove this margin */
display: inline;
vertical-align: bottom;
}
and add some padding here as per your need
.dropdown{
padding-top: 20px;
}
This should do the trick;
I tried looking your code in console, I added one line and removed one.
and it seems to work as per you expectation.
Do let me know if this what you wanted.
I have this site:
http://dl.dg-site.com/functionmentes/
This is code CSS:
#media screen and (width:1024px)
{
#titlu_footer
{
margin-left:90px;
}
}
I tried to add this code but not working.
What is wrong?
In your media query change width to min-width or max-width
Additional problem
This is currently your CSS for #titlu_footer
.page-id-1637 #titlu_footer {
color: #264572;
font-family: muli, sans-serif;
letter-spacing: 2px;
line-height: 1.4;
font-weight: 400;
margin-left: 302px;
margin-top: 30px;
padding-top: 20px;
}
If you look using chrome/firefox developer tools you'll see that margin-left 302px is taking precedence over your media queries.
I'm trying to enlarge a smaller picture. I have a small and a large version of the pictures. I've searched on the internet, the one i'm using is the best i've found.
I know this would be much easier with 'Lightbox2' or other javascript things, but the purpose is to only use html & css.
Here you can find the link (dropbox, .zip file) to the website' folder --> https://dl.dropboxusercontent.com/u/61634717/Website.zip
It would be nice if someone could find the problem why my smaller pictures aren't enlarged when hovering over. The website is only showing the small pictures when hovering over them.
Here is the html code (for one picture):
<div class="ienlarger"><a href="#nogo"><img src="Pictures/Artists/PeopleTalkTechnoSmall.png" alt="thumb" class="resize_thumb" /><span>
<img src="Pictures/Artists/PeopleTalkTechno-Large.png" alt="large" /><br />Some text can go here.</span></a>
</div>
Here is the css code:
.ienlarger {
float: left;
clear: none;
padding-bottom: 5px;
padding-right: 5px;
}
.ienlarger a {
display:block;
text-decoration: none;
cursor:default;
}
.ienlarger a:hover{
position:relative;
}
.ienlarger span img {
border: 0px solid #FFFFFF;
margin-bottom: 8px;
}
.ienlarger a span {
position: absolute;
display:none;
color: #FFCC00;
text-decoration: none;
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
background-color: #2E2E2E;
font-weight: bold;
padding-top: 10px;
padding-right: 10px;
padding-bottom: 13px;
padding-left: 10px;
}
.ienlarger img {
border-width: 0;
}
.ienlarger a:hover span {
display:inline-table;
top: 50px;
left: 90px;
z-index: 100;
}
.resize_thumb {
width: 170px;
height : auto;
}
NOTE: Do not pay attention to the background colors :D. I know they are weird, but it is just for me to see the different < div > (they will be changed when the website is closer to being completed).
Alright, I downloaded your code and messed around with it.
Removing max-width: 100%; from the img CSS seems to have fixed it (line 25). In the future, please post the code along with your question, or if there are a lot of parts to it, a JSFiddle is also acceptable.
Thanks.
In your css you have all images set to a max-width of 100% probably to make it responsive, which is good. But that is also your problem. The images can only be 100% of their container and no bigger. If you remove img {max-width: 100%} from your css that fixes your issue.
But is also makes it not repsonsive. :-(
So your solution is to add a class="larger" to the bigger image and add another line to your css. You would end up with something like this:
img {
max-width:100%;
height:auto;
}
img.larger {
max-width: 500px; /* the maximum size you would allow for larger images */
}
for all the classes below I have set a fixed height of 120px. Is there a way to control the height of all of them with one single class (class or something else) ?
I know I could do .header, .logo, .etc { height: 120px } and remove the the height from all the individual items but that would still not look like the most efficient solution. Thanks
.header {
width: 100%;
height: 120px;
background: #fff;
color: #124191;
font-weight: 300;
font-size: 28px;
display: table;
position: fixed;
z-index: 999999;
}
.logo {
vertical-align: middle;
line-height: 120px; /* this is set to same height as the div */
left:0;
height:120px;
color: #333;
font-size: 30px;
font-weight: 800;
letter-spacing: -1px;
margin-left: 60px;
}
.drop_menu {
background:red;
padding:0;
margin:0;
list-style-type:none;
height:120px;
right: 0;
display: table;
z-index: 3000;
display: table-cell;
vertical-align: middle;
right: 0;
}
You're going to have to use javascript for this, because CSS simply won't cover the type of interaction you want. First of all, if you want to set the height of several classes to one value simultaneously, you have two options:
Change the height of every single class using Javascript or jQuery. For example: $(".header, .logo, .dropmenu").height("80px");.
Make toggle a new class that applies to all elements. For example, if your class was defined as newClass {height: 80px;}, then you could do $(".header, .logo, .dropmenu").toggleClass("newClass");
See this link for more info about multiple selectors, and this link for more info about changing height, and finally this link for more info about toggling a class with jQuery. Of course, there are ways of doing this with just stock Javascript, but I personally prefer jQuery because it simplifies everything up a lot.
As for applying a class when scrolled to a certain height the following code or something similar could suffice:
$(".header, .logo, .dropmenu").scroll(function(){
if ($(".header, .logo, .dropmenu").scrollTop > 20){
$(".header, .logo, .dropmenu").toggleClass("newClass");
}
});
you can give one class to all three elements in html like
<div class="logo some_other_class">
<div class="header some_other_class">
<div class="dropmenu some_other_class">
and if you are using jquery you can change height like:
$(".some_other_class").css("height", "80px");
I have created a scrolling new bar, I want to put the content in the bar center,
I defined a css:
.myfont {
font-size: 18pt;
padding-bottom: 0px;
text-align: center;
}
but text-align: center doesn't work, how to write the css? Here is my fiddle.
Dude you forgot to use the class http://jsfiddle.net/ZKKFU/35/
<div id="newsbar" class="myfont"></div>
Instead of making any further changes to mark up, you just need to make your class .myfont to have a display:block;. This will make the div to understand text-align:center; to a div with a width of 100%.
For Instance,
.myfont {
font-size: 18pt;
padding-bottom: 0px;
text-align:center;
width:100%;
display:block;
}
WORKING DEMO
try to give value of width and use float it solve your problem :)
.myfont {
font-size: 18pt;
padding-bottom: 0px;
text-align:center;
width:100%;
float:left;
}
Demo