Can anyone help with an html+css to give the columns in the right order for SEO. I want the middle column (which appears 3rd in my html) to be first. I have fixed width columns and fluid middle. . . Point me in the right direction???
Thanks
Kate
Page 1 of 1
3 column html+css with proper source order (2-1-3)
#2
Posted 08 February 2010 - 05:22 PM
You need to rewrite and do it with css, the following would work
html
css
The brilliance of the code above, is that it is so easy to edit the columns, you can add a different colour to each, add different widths and any other css attributes. You need to keep the "float:left" as it makes all of the columns appear in a line.
Hope that helps
html
<div class="column" id="left"> content </div> <div class="column" id="middle"> content </div> <div class="column" id="right"> content </div>
css
.content {
float:left;
width:300px;
}
#left {
margin-right:25px;
}
#middle {
margin-right:25px;
}
#right {
}
The brilliance of the code above, is that it is so easy to edit the columns, you can add a different colour to each, add different widths and any other css attributes. You need to keep the "float:left" as it makes all of the columns appear in a line.
Hope that helps
#3
Posted 08 February 2010 - 05:32 PM
Thanks but have I explained myself. . . ? Columns left and right will just have pictures in them. The centre column will have all the text - therefore for SEO and search purposes I want the text (the middle column) to be first in the html..
<div id="center">
Blah blah
</div>
<div id="left">
pictures
</div>
<div id="right">
pictures
</div>
Will what you have given me work?
cheers
Kate
<div id="center">
Blah blah
</div>
<div id="left">
pictures
</div>
<div id="right">
pictures
</div>
Will what you have given me work?
cheers
Kate
#4
Posted 08 February 2010 - 06:25 PM
I would recommend you go with what Faevilangel said.
The only way you can get this to work is by using absolute positioning, but things get messy really quickly that way.
You wont sacrifice much SEO if you have the sidebar come before the content.
The only way you can get this to work is by using absolute positioning, but things get messy really quickly that way.
You wont sacrifice much SEO if you have the sidebar come before the content.
#6
Posted 09 February 2010 - 01:15 PM
There is a way you can do this, although it's not as clean as I'd like. What you need to do is enclose the main content (middle) and the left column in a div of their own, and float it left. Float the right column to the right, then position the main content and left column within their own div like so:
Hope that helps
<div id="2col">
<div id="centre">
<!-- main content -->
</div>
<div id="left">
</div>
</div> <!-- 2col ends -->
<div id="right">
</div>
#2col {width:720px;float:left;}
#centre {width:480px;float:right;}
#left {width:240px;float:left;}
#right {width:240px;float:right;}Hope that helps
#9
Posted 09 February 2010 - 01:54 PM
He's one of the original "CSS gurus" - watch this video about CSS layout techniques - he demonstrates the same method in there
Share this topic:
Page 1 of 1
Help


















