Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Struggling with website centering in different browsers ?
Old 05-24-2010, 07:07 AM Struggling with website centering in different browsers ?
Experienced Talker

Posts: 30
Trades: 0
Hi

If someone could take the time to have a quick look at link

It looks perfectly fine in both IE7 and FF on my pc, please see image attached but it seems to be centered to far left on others, and the center product boxes are stretched? I've checked it in browsershot and it does seem to be the case.

I have tried to change the CSS style slightly but can't view on 'browser shot' again for a while and the site of course is active. I have validated the CSS and its fine so where is my issue here ?



Any guidance here would be fantastic, I realise its people time but I pressume it something silly that I have missed, but sometime when you are so close it difficult to see the wood for the trees

thanks

Ashley
acknowledged74 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-24-2010, 07:29 AM Re: Struggling with website centering in different browsers ?
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
Using firebug it appears the proplem stems from the structure of the HTML,

The fix, in its simplest form, wrap a div around the whole site with a fixed width and margin:0 auto;

If you have the ability, go through each div block/structure area, i.e. topHeader etc and give them a fixed px width and apply margin:0 auto;

You may also need to put a width:100%; on the body in your css.

Howver, if you want the layout to be more fluid, with the content area streching but the header, nav and footer being centred then you will need to give the body a width of 100% and play with the header.
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 05-24-2010, 07:41 AM Re: Struggling with website centering in different browsers ?
Experienced Talker

Posts: 30
Trades: 0
Thanks. The site need to be positioned to the left margin, as it has been designed to fit in with an existing site. I have just add margin: 0 auto; to both the body and top-header and it has of course centered it on the page? I've added a container div around the whole thing.

Last edited by acknowledged74; 05-24-2010 at 07:56 AM..
acknowledged74 is offline
Reply With Quote
View Public Profile
 
Old 05-24-2010, 01:54 PM Re: Struggling with website centering in different browsers ?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
You may also need to put a width:100%; on the body in your css
Why? If you don't define a width, the default IS 100% of the available space.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-24-2010, 02:29 PM Re: Struggling with website centering in different browsers ?
Experienced Talker

Posts: 30
Trades: 0
Can someone check it now please I've added in a float:left, it still looks fine on my computer but is it level with the left border or is some of the top header image still lost ?
acknowledged74 is offline
Reply With Quote
View Public Profile
 
Old 05-25-2010, 04:03 AM Re: Struggling with website centering in different browsers ?
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
Everything looks level ack although the whole site is aligned left in all browsers, you not trying to centre it any more?


@LadynRed: I dont know why it was needed specifically however while using firebug the body was rendering at a fixed width (not 100%) and didnt appear to have any CSS affecting its width (Suggesitng it should have been 100%). However applying width:100%; to the body in firebug appeared to fix some of the issues faced by the OP.

Unfortunatly without being able to show you the site as it was yesterday you probally wont understand where im coming from, regardless of that, the OP now seems to be moving towards the finish line.
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 05-25-2010, 09:24 AM Re: Struggling with website centering in different browsers ?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Interesting. There must have been something limiting the width somewhere.
Anyway.. that left-aligned site is so very old school.. to be inline with another site? I'd center them both!
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-25-2010, 11:15 AM Re: Struggling with website centering in different browsers ?
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
Quote:
Originally Posted by LadynRed View Post
Anyway.. that left-aligned site is so very old school.. to be inline with another site? I'd center them both!

Agreed, centred sites do look much better, maybe its the symetrical feel.
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Reply     « Reply to Struggling with website centering in different browsers ?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.32124 seconds with 12 queries