Basic CSS Content Placement Question

Discussion in 'HTML' started by Rangy, Mar 8, 2007.

  1. Rangy

    Rangy Guest

    Hi,

    Say you have a simple layout as follows (all DIVs):

    Header
    Content Column
    Footer

    What is the best way to align and position the content WITHIN the
    "Column" div? In the past I would have used nested tables but I'm not
    sure of how "the pros" out there do it.

    I saw some suggestions about creating a child element (e.g. <p>) and
    then using absolute positioning with a parent (h1) element that is set
    for relative positioning.

    Any advice is greatly appreciated. There must be a better way than
    <br>!

    Thanks!
    Rangy
     
    Rangy, Mar 8, 2007
    #1
    1. Advertising

  2. Rangy wote:
    > Hi,
    >
    > Say you have a simple layout as follows (all DIVs):
    >
    > Header
    > Content Column
    > Footer
    >
    > What is the best way to align and position the content WITHIN the
    > "Column" div? In the past I would have used nested tables but I'm not
    > sure of how "the pros" out there do it.
    >
    > I saw some suggestions about creating a child element (e.g. <p>) and
    > then using absolute positioning with a parent (h1) element that is set
    > for relative positioning.
    >
    > Any advice is greatly appreciated. There must be a better way than
    > <br>!
    >
    > Thanks!
    > Rangy


    I don't have my crystal ball with me today, but I'll bet that Column
    is for navigation, isn't it? How about
    <ul id="nav">
    <li><a href="somewhere.html"></li>
    <li><a href="thispage.html" id="thispage"></li>
    </ul>

    Depending on how you are generating the page (by hand static) or
    server side, you can use the id="thispage" to make that link different
    from the others so people will know that they are on that page.

    --
    Adrienne Boswell at work
    Administrator nextBlock.com
    http://atlas.nextblock.com/files/
    Please respond to the group so others can share
     
    Adrienne Boswell, Mar 8, 2007
    #2
    1. Advertising

  3. Rangy

    Bergamot Guest

    Rangy wrote:
    >
    > I saw some suggestions about creating a child element (e.g. <p>) and
    > then using absolute positioning with a parent (h1) element that is set
    > for relative positioning.


    Unless you know what you are doing, you should avoid absolute
    positioning. The inexperienced often end up with broken design.

    What to do instead is dependent on the particular content and what you
    are really trying to achieve. There is no one best way.

    BTW, nesting <p> inside <h1> is invalid. And relative positioning
    probably isn't what you think it is. Read the specs at
    http://www.w3.org/TR/CSS21/visuren.html

    --
    Berg
     
    Bergamot, Mar 8, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UGF1bA==?=

    dynamic data grid placement question

    =?Utf-8?B?UGF1bA==?=, Oct 21, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    387
    =?Utf-8?B?UGF1bA==?=
    Oct 21, 2004
  2. hazz
    Replies:
    6
    Views:
    50,030
    SkyUCHC
    Jun 9, 2010
  3. Ioannis Vranos

    Placement operator new/delete question

    Ioannis Vranos, Oct 16, 2004, in forum: C++
    Replies:
    11
    Views:
    5,722
    Ioannis Vranos
    Oct 16, 2004
  4. KJ
    Replies:
    2
    Views:
    1,680
    Brian Drummond
    Sep 22, 2006
  5. Replies:
    11
    Views:
    560
    peter koch
    May 19, 2008
Loading...

Share This Page