SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    139
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    does mark up order matter?

    On this page I have been doing tests and notice to get text above float you put the float div below the <p> text:

    http://css.maxdesign.com.au/floatuto...oduction16.htm

    So does order matter? when drafting out markup should I be writing the xhtml with which image/area is above another or do you use z-index for that?

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,108
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    The main sections of the website should be logical, I would expect to come across...
    h1, a skip-to-content link, menu, content.
    or h1, content, menu

    But within those sections you basically code from top to bottom, though I really don't care about putting floats first for example to keep it inline with other content. Those sorts of small differences where you put something first isn't really a big concern.

    You can use many things to re-order content, one I use frequently is a negative margin opposite the direction of a float, and equal to the width. This Basically removes it from the flow and other elements can overlap it - though I think you can still clear it.

    e.g.
    Code:
    #example { float: left; width:200px; margin-right: -200px }
    <div id="example">I'm out of the flow!</div>

  3. #3
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    139
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks!


Bookmarks

Posting Permissions

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