Hmm, I tried margin:
.header2{
border: thin solid;
width: 100%;
color: #dd0000;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 24px;
font-weight: bold;
margin: 5px;
}
and while I have a 'proper' margin on the left side, and the box goes
all the way, it does not have a margin on the right side as well.
And - I still want padding _inside_ the box so the text isn't aligned
right against the border. When I add back in padding, I end up back in
the same place. So far, the 2 style declaration seems to be the only
good solution.
-rc
> -----Original Message-----
> From: Kevin Graeme [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 02, 2003 8:50 AM
> To: CF-Community
> Subject: Re: simple css question
>
>
> Well hell. You made me go and double-check myself, and it
> looks like you're right. Here's the w3c page:
> http://www.w3.org/TR/CSS1#block-level-elements
>
> Grrr. And I thought I was sure on this because I had just run
> into it working on something last night. Sorry Raymond. Now I
> have to go back and look at what I was doing at 2am.
>
> -Kevin
>
> ----- Original Message -----
> From: "Ben Doom" <[EMAIL PROTECTED]>
> To: "CF-Community" <[EMAIL PROTECTED]>
> Sent: Tuesday, September 02, 2003 9:41 AM
> Subject: RE: simple css question
>
>
> > My understanding is that padding is supposed to be inside,
> and margin
> > is supposed to be outside, but not all browsers render it
> that way.
> > I've noticed differences, for example, between Mozilla and Safari
> > which are
> both
> > different from IE6/Win.
> >
> > IE5/Mac is just fubared.
> >
> > Anyway, the only way I know of to fix this is with JS.
> >
> > HTH.
> >
> >
> > -- Ben Doom
> > Programmer & General Lackey
> > Moonbow Software, Inc
> >
> > : -----Original Message-----
> > : From: Raymond Camden [mailto:[EMAIL PROTECTED]
> > : Sent: Tuesday, September 02, 2003 10:15 AM
> > : To: CF-Community
> > : Subject: simple css question
> > :
> > :
> > : I've got this style def:
> > :
> > : .header {
> > : color: #dd0000;
> > : font-family: Verdana, Arial, Helvetica, sans-serif;
> > : font-size: 24px;
> > : font-weight: bold;
> > : border: thin solid;
> > : padding: 5px;
> > : width: 100%;
> > : }
> > :
> > : which works fine, except that the box stretches past the
> right edge
> > of
> > : the browser. It's like width is calculated first, then
> padding is added
> > : but instead of creating a padding _inside_ the box, the box has 10
> > : pixels added to it's width. I assume I've made a simple
> mistake, but I
> > : don't see it.
> > :
> > : -rc
> > :
> > :
> > :
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:5
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:5
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
http://www.cfhosting.com