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
Website not Centered in IE7, dispite being fine in every other browser
Old 03-31-2009, 10:30 AM Website not Centered in IE7, dispite being fine in every other browser
Novice Talker

Posts: 5
Name: reckless
Trades: 0
I have been going crazy, trying everything that Google and other forums suggested and just failing miserably. I've come here because I've been using answers from this forum for a while and they have always been incredibly useful.

The website url is http://www.scunt.co.uk -

I have done browser tests and in pretty much every browser it loads fine, with the main table centered - however, in IE7 it hugs the left of the browser window.

This is, from what I can tell a fairly common problem, its just that none of the fixes i've found work for me.

The website is powered by the CMS Drupal. I have reproduced the start of the CSS below. From what I understand

I am a noob, and deserve everything i get, so if anyone could find it in their hearts to help me, i can reward you with love and kudos.

thanks in advance xx

dom



Code:
html-main, .body-main	{
background-color:#ffcccc; 
	padding: 0;
	margin: 0 auto;
	width: 940px;
	font-family: Verdana, Georgia, "Times New Roman", Arial, Tahoma,  sans-serif;
	font-size: 0.9em !important;
	color: #181818;
	border-left-style: solid;
	border-left-width: 0px;
	border-right-style: solid;
	border-right-width: 0px;
	border-bottom-style: solid;
	border-bottom-width: 0px;

}


.body-main
{	

display:block;
text-align:center; 
margin:0 auto 0 auto;
background:transparent url("images/bg_white.gif") repeat-y center top;
	}


.make-it-center
{
margin: 0 auto;
text-align: center;
height: auto;
width:940px;
background-color:#f5f5f1;

}

.clear
{
	clear: both;
	font-size: 0px;
	line-height: 2px;
	visibility: collapse;

}

a{color:red; text-decoration:none}


a:hover{color:red; text-decoration:none;}


a:visited{color:red; text-decoration:none}




p
{
	margin: 0px;
	padding: 0 0 10px 0;
}


/** headers **/
h1, h2, h3, h4, h5, h6 {line-height:normal;}

h1, h1.title
{font-size:1.7em; font-size:18px; margin-bottom:0px; font-weight:normal;}

h2{
font-size:1.9em;
font-weight:normal;
font-family: Verdana, Georgia, "Times New Roman", Arial, Tahoma,  sans-serif;
color:#ff6666;
padding:0;
margin:0.2em 0 0.2em 0;
}

h2 a{color:#f9999b;}

.block h2, .block  h2.title{
font-size:1.5em;
padding:5px 10px;
color:#fff;
background-color:#747474;
margin: 0 0 0.5em 0;
}

.block h2 a, .block h2.title a{color:#fff; font-size:-1}
.block h2 a:hover, .block h2.title a:hover{color:#bbbbbb;}

.sticky h2, .sticky h2 a{color:#343434 !important;;}
scunt is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-31-2009, 10:57 AM Re: Website not Centered in IE7, dispite being fine in every other browser
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
The margin: 0 auto; along with the defined width IS all you need for centering in IE7. Something else has to be affecting it besides the section of code that you posted.

You also have a number of validation errors - fix those and the problem might correct itself.
__________________
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


Last edited by LadynRed; 03-31-2009 at 11:07 AM..
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 03-31-2009, 11:01 AM Re: Website not Centered in IE7, dispite being fine in every other browser
Novice Talker

Posts: 5
Name: reckless
Trades: 0
right.. eep. - i'l have another look.

thanks x
scunt is offline
Reply With Quote
View Public Profile
 
Old 03-31-2009, 11:03 AM Re: Website not Centered in IE7, dispite being fine in every other browser
Novice Talker

Posts: 5
Name: reckless
Trades: 0
could it be another section of the same css overriding it?
scunt is offline
Reply With Quote
View Public Profile
 
Old 03-31-2009, 11:10 AM Re: Website not Centered in IE7, dispite being fine in every other browser
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Not that I could find using firebug. I would, however, remove the width and the margin:0 auto; from the <body>, it's really not necessary and leave the width and margin statement on your main container.
__________________
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 03-31-2009, 12:55 PM Re: Website not Centered in IE7, dispite being fine in every other browser
Novice Talker

Posts: 5
Name: reckless
Trades: 0
that was hung over from when i tryed to add 0 auto to everything in the vein hope that one of them would center it in IE. I will remove it in a bit-

maan, i hate IE so much - i wish people would just boycot the **** thing
scunt is offline
Reply With Quote
View Public Profile
 
Old 03-31-2009, 04:01 PM Re: Website not Centered in IE7, dispite being fine in every other browser
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
You and almost every other web designer IE8 is a huge, huge step forward - unfortunately it'll be a while before we'll be rid of IE6 and even 7.
__________________
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 03-31-2009, 06:47 PM Re: Website not Centered in IE7, dispite being fine in every other browser
Novice Talker

Posts: 5
Name: reckless
Trades: 0
well, that sounds reassuring

i wonder if my website will load up centered in 8.

frankly i'm working under the principle that if people dont have a decent browser, they dont deserve to see the site properly =D

direct-action!

xx
scunt is offline
Reply With Quote
View Public Profile
 
Old 04-01-2009, 12:12 PM Re: Website not Centered in IE7, dispite being fine in every other browser
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Chances are pretty good that it'll look fine in IE8 because it finally renders more like Firefox - way more standards compliant.

I only have access to IE7 here on our sandbox pc, so I'll have to try to look at the problem from home.
__________________
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
 
Reply     « Reply to Website not Centered in IE7, dispite being fine in every other browser
 

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.28110 seconds with 12 queries