Web Hosting Talk







View Full Version : Getting a div the same height in all browsers?


hopesfall
11-11-2008, 07:49 PM
How could I get a <div> to be the same height in all browsers? It's just a simple <div> tag with height properties, what should I add?

jasper_
11-11-2008, 08:32 PM
CSS:
* {
margin: 0;
padding: 0;
}
div#that_div {
height: 200px;
}
...
HTML:
<div id="that_div">
content here
</div>
that should do it! :)

Adam-AEC
11-11-2008, 08:37 PM
What browsers are you having problems with? Do you have a proper doctype at the top of your documents?

teachforjune-Scott
11-11-2008, 09:29 PM
You can also throw in overflow: hidden;

atomise
11-13-2008, 01:05 PM
<div id="that_div">
content here
</div>
yup, that's the wrapper.
do it before the other text in the body.