[thelist] help with fluid css layout

Mark Rees mrees at itsagoodprice.com
Fri Jul 22 10:25:57 CDT 2005


> > Sarah, the unexplained margins are the default margins from the browser
> > for the paragraphs.  If you add,
> > p {margin: 0; padding: 0; } into your css, you'll see the margins go
away.
>
> This does seem to work, and yet it seems like an awfully extreme way to
> get rid of these margins. Can anyone suggest a way to keep paragraph
> margins but get rid of the margins around my content div?


One option is to extend the paragraph class like this when you do want
margins/padding/etc


<style>
p {margin: 0; padding: 0; }
p.margins{margin:2px;}
</style>
<p class="margins">this has a 12px margin</p>
<p>this doesn't</p>




More information about the thelist mailing list