Help repositioning content div

This is a discussion on "Help repositioning content div" within the Starting Out section. This forum, and the thread "Help repositioning content div are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Starting Out

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 15th, 2007, 20:35
Junior Member
Join Date: Aug 2007
Location: UK
Age: 45
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Help repositioning content div

I hope somenone can point me in the right direction. I am currently working on a site http://www.discountlaptopsadvisor.com and I am quite pleased with the way thing are going so far. I have decided to use a tempplate from oswd, which I am very happy with apart from one thing.
In the HTML, I want the first content div to appear in the html to be the main content. However when I try and do this, the position of the left and right columns change relative to the main content div. They start when the main content div finishes. I believe i need to change the stylesheet, but I have realised that my knowledge of CSS has huge gaps, and the more I go into it the less I seem to know.

The reason for doing this is twofold. SEO to get the content higher up the html and the adsense placement if the main content appears first will contain the highest paying ads.

If someone can point me in the right direction I would be most grateful

I attach the open source index.html and stylesheet for info.

Best Regards, Mike
Attached Files
File Type: css andreas09.css (4.2 KB, 11 views)
File Type: html index.html (4.8 KB, 12 views)
Reply With Quote

  #2 (permalink)  
Old Aug 15th, 2007, 20:59
alexgeek's Avatar
Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,771
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: Help repositioning content div

could you link us? a lot easier
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #3 (permalink)  
Old Aug 15th, 2007, 21:08
Junior Member
Join Date: Aug 2007
Location: UK
Age: 45
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help repositioning content div

Not sure what you mean by link us, is this something extra to putting the link to the website in the post? I scanned the FAQ for postings and couldnt find what "link us" meant

sorry to show my ingnorance Ive only been a member for a couple of hours...

Thanks for the reply and let me know if I need to do anything more.
Reply With Quote
  #4 (permalink)  
Old Aug 15th, 2007, 21:13
alexgeek's Avatar
Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,771
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: Help repositioning content div

sorry man,
I meant could you upload it to net, to a hosting company so we can just view it.
easier than downloading files, it discourages people from helping if they have to download sutff.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #5 (permalink)  
Old Aug 15th, 2007, 21:28
Junior Member
Join Date: Aug 2007
Location: UK
Age: 45
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help repositioning content div

Its done! the test page is at http://www.discountlaptopsadvisor.com/test.htm It is the template from the oswd, and while the HTML has the main content div in the position I would like, the relative positioning of the left and right columns is thrown out of whack.

Sorry I was a bit slow on the uptake before, mate, I had a long day yeaterday and it just catching up with me.
Reply With Quote
  #6 (permalink)  
Old Aug 15th, 2007, 21:49
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help repositioning content div

To change the order of div's you have to change to absolute positioning.
I don't think I have all the dimensions of the three divs exactly correct.
Left side is fine, right side is fine but the center is now set to 55% to keep it fluid. See if this works ok.

Here is the css for the three css elements involved:
Code: Select all
#leftside {
    float:left;
    margin-right:10px;
    left: 0px;
    top: 0px;
}

#rightside {

float:right;

margin-left:10px;

}

#content {
    float: left;
    width: 55%;
    position: absolute;
    left: 185px;
}
No change to the html

See how this works for you.
Reply With Quote
  #7 (permalink)  
Old Aug 16th, 2007, 05:28
Junior Member
Join Date: Aug 2007
Location: UK
Age: 45
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help repositioning content div

Thanks for your efforts on this, I will give it a go and see what happens

best Regards, Mike
Reply With Quote
  #8 (permalink)  
Old Aug 16th, 2007, 07:32
Junior Member
Join Date: Aug 2007
Location: UK
Age: 45
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help repositioning content div

After reading through some of the excellent resources on this site, and looking at some of the posts, I believe I have bitten off more than I can chew at this moment in time given my inexpeerience with CSS. Content first layouts clearly exist, and the obvious thing would be to implement one of these straight away.

however I do not have the time to learn how to rework my template and build up my site, so I am going to get on with the site content and see if I can resolve the template issue to get it how I want it in the time I have left over. Just a question of priorities I guess

Lchad, thanks for your input but the center column just diappeared when I implement ed your CSS into the stylesheet.

Many Thanks, Mike
Reply With Quote
Reply

Tags
css, html, web design

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Expandable Content Script (Swtich Content) Matc JavaScript Forum 0 Apr 8th, 2008 10:53
Content Placement + Content Dividing josephman1988 Website Planning 2 Jan 22nd, 2008 05:02
Layering content on content in CSS? wickedmoon Web Page Design 1 Sep 10th, 2007 15:23
CSS content gets cut off gwx03 Web Page Design 1 Dec 15th, 2003 05:57


All times are GMT. The time now is 21:36.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43