Hi,
I'm trying to auto-center a webpage horizontally, but it's just not working. I've used the code snippets from the other threads here, and also from the Dead Centre page. I don't understand what I'm doing wrong!
The page is complicated, but I'm assigning div containers with the left and right margins to auto. I have specific spacing/margins for header/footer elements on the page... is that throwing everything off?
Thanks,
Suzanne
Everyone hates this
I know it's not popular, but google's designers agree with me. Use a center tag.
Put anything you want centered here.
I typically use css to center as well, just to be sure other browsers handle it.
Hope that helps
LokiLoks
lokiloks wrote:I know it's
I know it's not popular, but google's designers agree with me. Use a center tag.
Put anything you want centered here.
I typically use css to center as well, just to be sure other browsers handle it.
Hope that helps
LokiLoks
:curse:
Not acceptable!
suggesting the use of the
suggesting the use of the center tag certainly does not help. It's been deprecated and should not be used.
Auto margins must be used with an explicit width. Have you assigned a width to the container? A block level element will take up all available width by default, so there is nothing to center unless you set the width.
srgause wrote:Hi, I'm
Hi,
I'm trying to auto-center a webpage horizontally, but it's just not working. I've used the code snippets from the other threads here, and also from the Dead Centre page. I don't understand what I'm doing wrong!
The page is complicated, but I'm assigning div containers with the left and right margins to auto. I have specific spacing/margins for header/footer elements on the page... is that throwing everything off?
Thanks,
Suzanne
:shrug:
Good on you for checking the 'how to' section but did you read posting guidelines? a little link or sight of code is always asked for, then we might be able to actually help you.
it's a private development
it's a private development site so you won't have access to view the link, and like I said, it's SUPER COMPLICATED. I'm sure I have a conflicting style somewhere... when I set margin: auto everything aligns left. Actually, everything I do aligns the content left, unless when I specify specific left and right percentages. But no left-align or left margins are in place (that I can see)
This is probably not the right place to ask questions, but I'm so stuck and just can't do anything else!!!
oh, and yes i have the width
oh, and yes i have the width set to 750px
this is what i have so far and it's fake-centering when the browser is fully expanded
body { margin: 0px;}
#page-wrapper {position:absolute; top:5%; left: 11%; right: 10%; width:100%;}
oh, and yes i have the width
oh, and yes i have the width set to 750px
this is what i have so far and it's fake-centering when the browser is fully expanded
body { margin: 0px;}
#page-wrapper {position:absolute; top:5%; left: 11%; right: 10%; width:100%;}
oh, and yes i have the width
oh, and yes i have the width set to 750px
this is what i have so far and it's fake-centering when the browser is fully expanded
body { margin: 0px;}
#page-wrapper {position:absolute; top:5%; left: 11%; right: 10%; width:100%;}
oh, and yes i have the width
oh, and yes i have the width set to 750px
this is what i have so far and it's fake-centering when the browser is fully expanded
body { margin: 0px;}
#page-wrapper {position:absolute; top:5%; left: 11%; right: 10%; width:100%;}
Hmm SUPER COMPLICATED not
Hmm SUPER COMPLICATED not sure what that means except that it generally will tend to mean incorrect (no offence intended) CSS layouts are not generally super complicated however without sight of anything we are not really in a position to be able to help you are we?
How about posting the code?
edit/ x-posted with above, but super complicated begins to make sense, all code is helpful, within code tags, however position absolute is not going to make matters simple
Why on earth are you using
Why on earth are you using absolute positioning?
thepineapplehead wrote:Why
Why on earth are you using absolute positioning?
it's super complicated
