...

View Full Version : Can't center content.



engar
08-09-2010, 07:20 PM
Hello everyone,

I'm a designer and not precisely a code savy, I'm working on my site and I just uploaded a "coming soon" page to my hosting, the original image on my pc is centered, all divs have the "center" and "margin: auto" in the css and yet when it's up it goes to the left.

Some help, please.

This is the link, please treat it with discretion since the page is not oficially up yet.

www.theengarpresence.com

SB65
08-09-2010, 08:55 PM
The problem is on your body tag. Your javascript is applying an inline style. In Firebug I see:


<body style="margin:0px;padding:0">

which is overriding your css style.

Anticipating that the javascript is from your hosting ads and not editable, then I'd suggest removing the width from body entirely, and adding another div which wraps everything else, and has width:630px, and margin:0 auto. Then everything should centre fine.

EDIT: Not sure whether you're trying to centre the text as well - if so then you have:


div.contenido {
font-size:18pt;
font-weight:bold;
letter-spacing:0.1px;
margin:auto;
padding-top:10pt;
text-align:left;
}

which is preventing this.

engar
08-09-2010, 09:16 PM
That did it, thanks man

You are a magician.

Regards.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum