I've defined my div's height in a stylesheet:
.topbar{
width:100%;
height:70px;
background-color:#475;
}
But as soon as text is entered into the div, the divs height changes.
Any ideas?
I've defined my div's height in a stylesheet:
.topbar{
width:100%;
height:70px;
background-color:#475;
}
But as soon as text is entered into the div, the divs height changes.
Any ideas?
You can try max-height: 70px; See if that works.
You can also use min-height and max-height. It was very useful for me
If you want to keep the height of the DIV absolute, regardless of the amount of text inside use the following:
change the div to display block
i made a jsfiddle example here please check
http://jsfiddle.net/TgPRM/