Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Centring table in IE using CSS/Wrapper Div for oscommerce

Community Beginner ,
Aug 21, 2006 Aug 21, 2006
Hi,

I am implementing OScommerce using stylesheets to centre the oscommerce page in the browser.

I am using a #holder (wrapper) div around the whole BODY contents with left and right margins set to "auto"

(This is based on Adrian Senior's article on this site
http://www.adobe.com/devnet/dreamweaver/articles/css_concepts_mx2004_05.html).


This works in Firefox, Opera and Netscape, but not in good old IE. The site stays stubbornly flush left in the IE browser window.

The site with the problem is

http://www.sueharrington.co.uk/catalog/

I have made it work in all browsers with another site which I copied the CSS and HTML from and I can't see the difference, other than the one <div> is enclosing oscommerce and another isn't.

The CSS I use is

#holder {
width:770px;
text-align:left;
margin:0 auto;
padding:0px;
background-color:#FFFFFF;
}

with the following html

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<div id="holder"> <!--This Div contains the entire page -->

----- HTML or PHP Statements Here

</div>
</body>


Anyone have any ideas or know any nifty IE hacks to get round this problem?

Many thanks,

Neil
TOPICS
Server side applications
292
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 21, 2006 Aug 21, 2006
> The CSS I use is
>
> #holder {
> width:770px;
> text-align:left;
> margin:0 auto;
> padding:0px;
> background-color:#FFFFFF;
> }
>

Add to this -

body { text-align:center; }

--
Murray --- ICQ 71997575
Adobe Community Expert
(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
==================


"Enscott" <webforumsuser@macromedia.com> wrote in message
news:eccg73$gn0$1@forums.macromedia.com...
> Hi,
>
> I am implementing OScommerce using stylesheets to centre the oscommerce
> page
> in the browser.
>
> I am using a #holder (wrapper) div around the whole BODY contents with
> left
> and right margins set to "auto"
>
> (This is based on Adrian Senior's article on this site
> http://www.adobe.com/devnet/dreamweaver/articles/css_concepts_mx2004_05.html).
>
>
> This works in Firefox, Opera and Netscape, but not in good old IE. The
> site
> stays stubbornly flush left in the IE browser window.
>
> The site with the problem is
>
> http://www.sueharrington.co.uk/catalog/
>
> I have made it work in all browsers with another site which I copied the
> CSS
> and HTML from and I can't see the difference, other than the one <div> is
> enclosing oscommerce and another isn't.
>
> The CSS I use is
>
> #holder {
> width:770px;
> text-align:left;
> margin:0 auto;
> padding:0px;
> background-color:#FFFFFF;
> }
>
> with the following html
>
> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0"
> leftmargin="0" rightmargin="0">
> <div id="holder"> <!--This Div contains the entire page -->
>
> ----- HTML or PHP Statements Here
>
> </div>
> </body>
>
>
> Anyone have any ideas or know any nifty IE hacks to get round this
> problem?
>
> Many thanks,
>
> Neil
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 21, 2006 Aug 21, 2006
Thanks Murray, That's fixed it.

Saved me hours of head scratching - as all good solutions, simple.

Thanks again

Neil
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 21, 2006 Aug 21, 2006
LATEST
You're welcome!

--
Murray --- ICQ 71997575
Adobe Community Expert
(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
==================


"Enscott" <webforumsuser@macromedia.com> wrote in message
news:eccj97$kjr$1@forums.macromedia.com...
> Thanks Murray, That's fixed it.
>
> Saved me hours of head scratching - as all good solutions, simple.
>
> Thanks again
>
> Neil


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines