Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DIVs for SEO

Status
Not open for further replies.

InZomnia

Programmer
Dec 29, 2005
19
0
0
Someone told me that I should use DIVs instead of tables, it's a good idea to control in what order the search engines read your site, but those DIVs are really causing me a headache!

I have made a main-DIV to keep everything centered on the screen, and within 780 px. I have placed all the other DIVs inside this one.

Here are the two problems:

1. After displaying the visual header (logo stuff) on the webpage, I want the *content* to be downloaded (it should be better to get a good rank on google), and *then* as the 3rd and 4th DIV I want my "menu" and a "login" part to be downloaded.
--- Problem: I cant make the content-DIV load as number two if I want it to be centered. I use float: left/right on the two next DIVs but they just dont pop up next to the content-DIV. How do I fix this, and still have it download as my 2nd DIV?

2. I want a contact-DIV in the very bottom with my contact info. Just like all the pro sites have.
--- problem: the contact-DIV isn't behaving the same way in FF and IE. It's actually totally messed up!

My html is below: if you copy/paste it, you can see on the background colors what order I would like them to load in. light color is early, dark-red is last.

Code:
<body>

<div id="main" style="width:780px;  margin:auto; top: 0px; background-color:#FFFFCC">
  
  <div id="welcome" style="width:780px; height:100px; margin:auto; background-color:#FFFF66">Welcome/logo/image</div>
  
  <div id="content" style="position:relative; width:440px; left: 170px; background-color:#FF9900;">Here goes the content</div>
  <div id="menu" style="float:left; width:160px; height:180px; background-color:#FF6600">Here goes the menu</div>
  <div id="login" style="float:right; width:160px; background-color:#FF3300">Here goes the login</div>
  
  <div id="contact" style="position:relative; width:780px;background-color:#CC3300">address/phone/copyright</div>

</div>

</body>

I think everyone could use this as a template, cuz it shows your site in the right order:
1. who you are (logo, name, welcome-to)
2. content
3. menu
4. less important stuff (login)
5. contact info

... if just it worked, but it doesn't :(
 
I think everyone could use this as a template, cuz it shows your site in the right order

Well - that's your own, subjective viewpoint. Personally, with the 5 "areas" you show above, I'd go with the following order:

Logo, etc
Menu / Login
Content
Secondary content
Contact info

The "login" has moved to be with the menu, because it's somethinig that most people will want to do early on upon visiting a site (if they are regular callers)

You might also want a contact link in the menu itself, of course. There's nothing wrong with doing this, AND having a contact link in the footer.

See our site, for an example of how I like site structure to be (look in FF with styles turned off, etc).

Hope this helps,
Dan

Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Someone told me that I should use DIVs instead of tables, it's a good idea to control in what order the search engines read your site,

Ignore them! it makes somewhere between zero and no difference at all

forum828 for SEO

Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
People Counting Systems

So long, and thanks for all the fish.
 
Thanks everyone, I'm studying it all and increasing my headache, and just keep wondering who made this s**t up!? tables are so much better.

I'm really trying, but its moving forward SO slow, things I could do in tables in a matter of seconds takes hours with divs.

Thanks everyone
 
Things I could do in tables in a matter of seconds takes hours with divs.
It's easier to do things with a skill you have than with a skill you have yet to learn. That doesn't make the old skill better than the new one. Stick with CSS, once you've got up the learning curve you'll wonder how you did things any other way.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
I'll agree with Chris,

CSS is infinatly better that tables, it is just a case of learning the technique behind it.

Once you've learned the CSS method you'll be producing Much MUCH cleaner mark-up and not have to read through lines and lines of <td> this and <tr> that!

When I frst started with Div i found it awkward, but after spending a little time, it is now extremely simple and logical to work with.

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top