|
| |
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
Does ordering of elements matter? - 2/8/2006 15:22:49
I have been playing with the height attribute of a div. With my CSS like this: <div style="border-style:solid;border-width:1px;border-color:#000000;height:100px"> IE (and Dreamweaver) ignores the height. However, if when I put the height element at the beginning like this: <div style="height:100px;border-style:solid;border-width:1px;border-color:#000000;"> it sizes as it should. Are there some ordering rules?
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Does ordering of elements matter? - 2/10/2006 12:54:58
It seems to matter. Try this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>Untitled Page</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
</HEAD>
<BODY>
<div style="border-style:solid;border-width:1px;border-color:#000000";height:70px;></div>
</BODY>
</HTML> Then try this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>Untitled Page</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
</HEAD>
<BODY>
<div style="height:70px;border-style:solid;border-width:1px;border-color:#000000";></div>
</BODY>
</HTML> An empty div with the height declared at the end of the style attribute seems to collapse, but when I put the height first, it does not, at least in IE.
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Does ordering of elements matter? - 2/10/2006 12:58:24
My bad. I have my closing quote for the style attributes in the wrong place. Chalk it up to poor cut and paste!
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|