Results 1 to 6 of 6

Thread: Writing proper HTML with CSS...

  1. #1

    Thread Starter
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765

    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 ). 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?
    Don't Rate my posts.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    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.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    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.

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Writing proper HTML with CSS...

    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width