![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, the following div is 38 pixels high in IE and Opera, however 42 pixels in Firefox (apparently it calculates the height exclusively the border width) div style="background-color: #000000; height: 38px; border: 2px solid #FF0000;"></div Now, I dont know which of them is right, but I would like to know whether there is a workaround. Thanks, Alexander |
#3
| |||
| |||
|
|
Du you have an example-page? Are there any elements within the div? Ist there a padding wich might change the hight? Maybe the div is just rendered right in Firefox and wrong in the two others: http://www.w3.org/TR/REC-CSS2/box.html http://www.positioniseverything.net/...box-model.html |
. As I mentioned, I dont know who is actually
#4
| |||
| |||
|
|
Now, I dont know which of them is right, but I would like to know whether there is a workaround. |
#5
| |||
| |||
|
|
Chris Leipold wrote: http://www.w3.org/TR/REC-CSS2/box.html http://www.positioniseverything.net/...box-model.html As I mentioned, I dont know who is actually right, but would like to know whether there is a workaround. |
#6
| |||
| |||
|
|
BTW - Is it really that big a deal? It's only 4 pixels, and unless you have them side by side, you wont know the difference. |
#7
| |||
| |||
|
|
Did you read the stuff mentioned by Chris? |
#8
| |||
| |||
|
|
the following div is 38 pixels high in IE and Opera, however 42 pixels in Firefox (apparently it calculates the height exclusively the border width) div style="background-color: #000000; height: 38px; border: 2px solid #FF0000;"></div Now, I dont know which of them is right, but I would like to know whether there is a workaround. |
#9
| |||
| |||
|
|
Chris Leipold wrote: Du you have an example-page? Are there any elements within the div? Ist there a padding wich might change the hight? Maybe the div is just rendered right in Firefox and wrong in the two others: http://www.w3.org/TR/REC-CSS2/box.html http://www.positioniseverything.net/...box-model.html Well, there isnt much of an example necessary. Just drop the code into a file and see yourself . As I mentioned, I dont know who is actuallyright, but would like to know whether there is a workaround. |
#10
| |||
| |||
|
|
It is, as I still didnt find a way to center the content of a div vertically. |
.![]() |
| Thread Tools | |
| Display Modes | |
| |