firefox issue with height/padding
The padding-top and height css properties differs in IE and Firefox.
This is what happens:
Now if we add the style tags
In IE ,the height stays fixed as 50px but with Firefox, the height tends to increase as we add the padding-top value.
Is there any way to fix this in Firefox, ie to have the height fixed at a certain value?
NOTHING needs to be fixed in Firefox - the defined size of an elements is the inside dimensions, and padding, margins, and borders add to this. If you are seeing different behaviour in IE, it is because you are not using a valid doctype and IE is in quirks mode with its buggy outdated box model.
Pardon me...I am quite a beginner with CSS.
Is there anything to be done to fix this 'quirk' mode in IE?....any line of css style tags or anything.
This is not css, but basic html - the first line that should appear in your html page is the doctype. For new pages, the most appropriate one to use is html 4.01 strict - so the start of your html should look like
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Your title here</title>
Centauri is being kind by using the term "outdated." IE's box model is just flat wrong in older versions and in new versions without a proper doctype.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)