InZomnia
Programmer
- Dec 29, 2005
- 19
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.
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 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