![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| ||||||
| ||||||
|
|
Hi Firefox 2.0 IE 7.0 Opera 9.22 |
|
body div id='outer' style='border-style: solid; border-width: 1px; border-color: rgb(0,255,0)' div id='inner1' style='float:left'>goodbye</div div id='inner2' style='float:left'>cruel</div div id='inner3' style='float:left'>world</div /div /body I get a solid green line (I guess this is an 'empty' <div>) with goodbyecruelworld underneath the line (I guess this is outside the 'outer' <div |
|
Now my (currently rudimentary) understanding of styles leads me to believe that a <div> is a container to which style can be applied, I also understood that what goes on in a div was isolated from other <div>s |
|
To confuse me even more the following code body div id='outer' style='border-style: solid; border-width: 1px; border-color: rgb(0,255,0)' div id='inner1' style='float:left'>goodbye</div div id='inner2' style='float:left'>cruel</div div id='inner3'>world</div /div /body gives me what I'm after i.e goodbyecruelworld in a screen wide green box. |
|
I'm confused by this, why should adding style='float:left' to 'inner3' cause such a fundamental change in the rendered output. |
|
A link to a really good (easy to understand ?)tutorial on the float style attribute would be great. |
#3
| |||
| |||
|
|
Firefox 2.0 IE 7.0 Opera 9.22 Safari? Lynx? IE6? That monkey thing that has replaced Mozilla? :-) |
|
You really need to read chapter 9 of the CSS recomendations, the visual formatting model. It's hard work but after a few readings you will see what is going on. |
|
One thing you should do when playing with this stuff is to put different coloured borders around _everything ... Firebug is good for this, you can add borders to existing pages on the fly. |
#4
| |||
| |||
|
|
A link to a really good (easy to understand ?)tutorial on the float style attribute would be great. |
![]() |
| Thread Tools | |
| Display Modes | |
| |