How to put important content first in html/xhtml

Discussion in 'HTML' started by Douwe Osinga, Jul 8, 2003.

  1. Douwe Osinga

    Douwe Osinga Guest

    Hi,

    I would like to make my website as friendly as possible for mobile
    devices and search engine bots. That is, I think that all the
    important stuff should be at the beginning of the document, followed
    by the navigation stuff.

    I have a floating navigation menu on the right side of my page. It is
    in a div tag like: <div style="float:right">content of menu</div>. If
    I put this as the first tag of my page, it will appear where I want
    it, on the right side of the page, the rest of the text floating
    around it. If, however, I put it at the end of my text, it will appear
    the bottom of the page.

    How do I fix something like this? Also, is it possible to define the
    whole menu structure at the top of the page at the bottom of the
    source text?

    Thanks,

    Douwe Osinga
    http://douweosinga.com
     
    Douwe Osinga, Jul 8, 2003
    #1
    1. Advertising

  2. On Tue, 08 Jul 2003 09:38:32 -0700, Douwe Osinga wrote:

    > I have a floating navigation menu on the right side of my page. It is
    > in a div tag like: <div style="float:right">content of menu</div>. If
    > I put this as the first tag of my page, it will appear where I want
    > it, on the right side of the page, the rest of the text floating
    > around it. If, however, I put it at the end of my text, it will appear
    > the bottom of the page.


    The basic technique is if you have something like:

    <body>
    <div style="float:right;">menu</div>
    <div>content</div>
    </body>

    Replace with:

    <body>
    <div style="float:left;">content</div>
    <div>menu</div>
    </body>

    There are more details of course: you will need to set widths, fiddle with
    alignments, etc.

    My site has several different style sheets, many of which use this
    technique:

    http://www.goddamn.co.uk/tobyink/

    --
    Toby A Inkster BSc (Hons) ARCS | mailto: | pgp:0x6A2A7D39
    aim:inka80 | icq:6622880 | yahoo:tobyink | jabber:
    http://www.goddamn.co.uk/tobyink/ | "You've got spam!"
    playing://joe_90/dream_this/11_cars_go_by.ogg
     
    Toby A Inkster, Jul 8, 2003
    #2
    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.

Share This Page