Hi

Firefox places 1em 0 anyway on  p elements anyway (not sure about the other 
browsers), so it (firefox) will define the same margin as your framework's p 
rule.

Type this into your firefox address bar:
resource://gre/res/html.css

p, dl, multicol {
  display: block;
  margin: 1em 0;
}


You can also view it in firebug (options > show user agent CSS)

w3c says this
http://www.w3.org/TR/CSS2/visudet.html#Computing_widths_and_margins

"If 'margin-top', or 'margin-bottom' are 'auto', their used value is 0. "

So you can't do #custom p { margin : auto; }  as it will end up being computed 
as margin : 0;
--  and firefox adheres to that rule.

Your best bet is to write your own rule or fiddle with the framework so it 
doesn't rule your code (can't you specify which stylesheets load ?)

Cheers
James


On Tue, 2 Jun 2009 12:36:47 pm Douglas Reith wrote:
> Hi,
> This might be basic to some people...
>
> The site I'm working on has a default CSS that comes with the framework
> that it runs on. The default CSS defines a property, specifically
>
> p { margin: 1em 0; }
>
> I can't edit the default CSS because it'll be updated with the framework
> (won't be easy to maintain).
>
> I've need to override the default CSS in certain sections of the site.
> I'm simply using:
>
> <div id="CustomPage"> ...<p>something</p>.. </div>
>
> And then in my own stylesheet (for example):
>
> #CustomPage p {
> margin: 0 0;
> }
>
>
> Which works fine. However, what I would really like to do is actually
> revert to the browser's margin property. That is, not override the
> margin property but remove it. I don't want the default margin property
> either. I just want the browser to define it.
>
> Can this be done?
>
> Thanks so much,
> Doug
>
>
> *******************************************************************
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: memberh...@webstandardsgroup.org
> *******************************************************************



*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Reply via email to