How to put important content first in html/xhtml

D

Douwe Osinga

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
 
T

Toby A Inkster

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/
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top