Writing proper HTML with CSS...
Alright, not that I honestly give a crap about old browers,
HTML Code:
<div id="dvHeader">
<span id="HeaderRightCol">Styles</span>
<span style="clear:left">
<span id="HeaderSiteLogo">Pc_Madness's Page of Pageness!</span>
</span>
<br>
<span style="float:right">Month Selector</span>
<span style="clear:left">Nav Bar That Sits Below Here</span>
</div>
The styles aren't particular important I guess (all a work in progress :p). Basically Styles and Month are floatted to the right and the others sit on the left.
Anyway, just wondering if using Span's is the correct way to go? People are always talking about markup that degrades well with older browsers (that the right word?), so I'm not sure if I should be using Paragraphs and stuff instead?
Re: Writing proper HTML with CSS...
You should use SPAN if you have no other way to do it. I'm guessing that you avoid the usage of tables in setting your layouts, so you could either use DIVs or SPANs.
However, it is considered better if you use <p>s instead of a combination of <span>s and <br>s.
Re: Writing proper HTML with CSS...
Span's mostly a bad choice in this situation. Div is a block, which creates a new line.
Use Firefox's developer toolbar, "disable styles", to test what the page looks like without styles.
Re: Writing proper HTML with CSS...
Where can I find FF's developer toolbar? I have IEs dev toolbar, but didn't know FF had one.
Re: Writing proper HTML with CSS...
Inside a <div> block you can denote chunks of text using <p> tags and within paragraphs you can apply styles to individual bits of text using <span>'s. That's how I use it.
Re: Writing proper HTML with CSS...