Sent by Debes, Brandon on 31 March 2004 15:03
I ran up against this problem long ago. Here's how I solved it.
Wrap the whole page in a regretably unsemantic <div id="bottle"> and
style thusly:
#bottle * { margin-left: auto; margin-right: auto }
#bottle { text-align: center }
body>div#bottle { text-align: left } /* trick IE */
Setting horizontal margins to auto will center blocks in IE; just with
the added stipulation that the containing element have text-align set to
center. To prevent real browsers from interpreting that correctly, use
the child selector to set it back. Since IE doesn't understand the
child selector, it will ignore it. Yes, this sucks. And yes, hopefully
we will be able to abandon such tricks in the future.
--
Brandon Debes, webmaster
Bellarmine University
> -----Original Message-----
> From: [EMAIL-REMOVED]
> [EMAIL-REMOVED]] On Behalf Of :.
> webspinner : encore tickets .:
> Sent: Wednesday, March 31, 2004 9:36 AM
> To: [EMAIL-REMOVED]
> Subject: Re: [css-d] Formatting for FAQs
>
>
> man, i really need some help. i am at wits end and further
> research only tends to confuse me more with-5 different
> browsers in 4-5 different "versions" all having quirks.
>
> all i want to do is center my content for the following site:
>
> http://moshot.com
>
> when i try "container" type centering for all my content, it
> just doesn't work with my existing sheet. it centers in IE
> only, which i have learned is due to IE's incorrect way of
> centering block elements (text-align, instead of dual
> matching margin widths).
>
> my question goes deeper though. the way i have my content
> very tightly set with flush left and right margins, i will
> have to wrap each piece of text content with separate classes
> (IDs) and that whole process seems counter-productive to the
> benefits of CSS.
>
> furthermore, i have combed tons of sites, including wiki, and
> have yet to find a good way to cascade an external CSS
> document to make sure you aren't breaking the declarations
> set forth earlier in the document (if that makes any sense)
>
> so i guess, number 1 - how do i center my entire page for all
> browsers?, and 2, is there any good resource for proper CSS
> declaration such as:
>
> I. declare BODY processing first
> II. declare H1 next
> III. declare H2 next
> IV. declare P next
>
> ...or am i just insane? i used to feel confident about CSS
> until i joined this list and learned how many different
> browsers render ...differently. the whole subject almost
> makes me want to say, "what's the use - CSS is not ready for
> prime time"
>
> thanks, and good morning and happy hump day to the group.
>
> ---------------------------------------------
> Christian Griffith, CIO
> Encore Tickets - Get Up Close
> http://EncoreTickets.com
>
> personal gig : http://phatz.com
> [100% ultra clean design]
>
> ----- Original Message -----
> From: "Chris Heilmann" [EMAIL-REMOVED]>
> To: "Scott Hamm" [EMAIL-REMOVED]>
> Cc: [EMAIL-REMOVED]>; "'Mary
> Villanueva'" [EMAIL-REMOVED]>; [EMAIL-REMOVED]>
> Sent: Wednesday, March 31, 2004 8:56 AM
> Subject: RE: [css-d] Formatting for FAQs
>
>
> > > I know you already looked into dl, however, I thought of
> something
> > > that works in more CSS compliant browsers, and am wondering if
> > > JavaScript can get this to work for IE or non CSS
> compliant browsers
> > > to run :before/:after content property:
> > >
> > > <style>
> > > dd, dl, dt {margin:0px;padding:0px;}
> > > dt:before {content:"Q: ";}
> > > dd:before {content: "A: ";}
> > > </style>
> > >
> > > <body>
> > > <dl><dt>Who is the Founder/CEO of MicroSoft?</dt>
> > > <dd>Bill Gates</dd></dl>
> > > </body>
> >
> > That is not that hard to do, the question is only how to
> check if the
> > browser supported it already or not. Let me see...
> >
> >
> ______________________________________________________________________
> > css-discuss [EMAIL-REMOVED]]
> > http://www.css-discuss.org/mailman/listinfo/css-d
> > Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
> >
>
> ______________________________________________________________________
> css-discuss [EMAIL-REMOVED]]
> http://www.css-> discuss.org/mailman/listinfo/css-d
> Supported
> by evolt.org --
> http://www.evolt.org/help_support_evolt/
>
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/