| Author |
site centering using CSS that works cross-browser?
|
|
| Rachael Caldwell 2005-12-14, 6:14 am |
| Can anyone tell me how to center a site using CSS only that actually works
cross-browser? I can get it to work in IE6 +, but FF1.07 & 1.5 & Netscape 8
all show it left aligned . . .
Man, you would think after all this time they'd adhere to the standard
specifications! : }
| |
| Osgood 2005-12-14, 6:14 am |
| Rachael Caldwell wrote:
> Can anyone tell me how to center a site using CSS only that actually works
> cross-browser? I can get it to work in IE6 +, but FF1.07 & 1.5 & Netscape 8
> all show it left aligned . . .
>
> Man, you would think after all this time they'd adhere to the standard
> specifications! : }
>
>
Are you using tables or <divs>
| |
| Osgood 2005-12-14, 6:14 am |
| Osgood wrote:
> Rachael Caldwell wrote:
>
> Are you using tables or <divs>
>
Div construction:
body {
margin: 0;
padding: 0;
text-align: center; /* this centers the design in PC IE */
#wrapper {
width: 750px;
margin: 0 auto;
left-align:left; /* this counteracts the the align center on the body */
}
Table constuction: you need to specifically detail margin-left/right, as
below for it to work in Mac IE5x
#wrapper {
width: 750px;
margin-left: auto;
margin-right: auto;
left-align:left; /* this counteracts the the align center on the body */
}
| |
| Rachael Caldwell 2005-12-14, 6:37 pm |
| W/try this - thank you!
"Osgood" <notavailable@atthisaddress.com> wrote in message
news:dnmn6g$sqr$1@forums.macromedia.com...
> Osgood wrote:
>
>
> Div construction:
>
>
> body {
> margin: 0;
> padding: 0;
> text-align: center; /* this centers the design in PC IE */
>
>
>
> #wrapper {
> width: 750px;
> margin: 0 auto;
> left-align:left; /* this counteracts the the align center on the body */
> }
>
>
>
> Table constuction: you need to specifically detail margin-left/right, as
> below for it to work in Mac IE5x
>
>
> #wrapper {
> width: 750px;
> margin-left: auto;
> margin-right: auto;
> left-align:left; /* this counteracts the the align center on the body */
> }
>
>
| |
| Rachael Caldwell 2005-12-14, 6:37 pm |
| trying to avoid tables completely, else this would be easy! Using <div>'s .
.. .
"Osgood" <notavailable@atthisaddress.com> wrote in message
news:dnmmtf$s70$2@forums.macromedia.com...
> Rachael Caldwell wrote:
>
works[color=darkred]
Netscape 8[color=darkred]
> Are you using tables or <divs>
>
| |
| Murray *TMM* 2005-12-14, 6:37 pm |
| Are you using absolute positioning on the page? If so, you will need to
make the outer wrapper have position:relative to accommodate them.
--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
"Rachael Caldwell" <nospam@aol.com> wrote in message
news:dnmpqm$3g6$1@forums.macromedia.com...
> W/try this - thank you!
>
> "Osgood" <notavailable@atthisaddress.com> wrote in message
> news:dnmn6g$sqr$1@forums.macromedia.com...
>
>
| |
|
| Missing } and left-align:left; is for drunks :)
You type too fast: :)
body {
margin: 0;
padding: 0;
text-align: center;} /* this centers the design in PC IE */
#wrapper {
width: 750px;
margin: 0 auto;
text-align:left; /* this counteracts the the align center on the body */
}
</style>
--
Cheers Pablo
Website:
http://www.dellwebsites.com
Photography:
http://www.dellimages.com
"Osgood" <notavailable@atthisaddress.com> a écrit dans le message de news:
dnmn6g$sqr$1@forums.macromedia.com...
> Osgood wrote:
>
>
> Div construction:
>
>
> body {
> margin: 0;
> padding: 0;
> text-align: center; /* this centers the design in PC IE */
>
>
>
> #wrapper {
> width: 750px;
> margin: 0 auto;
> left-align:left; /* this counteracts the the align center on the body */
> }
>
>
>
> Table constuction: you need to specifically detail margin-left/right, as
> below for it to work in Mac IE5x
>
>
> #wrapper {
> width: 750px;
> margin-left: auto;
> margin-right: auto;
> left-align:left; /* this counteracts the the align center on the body */
> }
>
>
|
|
|
|
| Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |