[thelist] CSS: div background color discrepancy

Julian Rickards julian.rickards at gmail.com
Thu Dec 7 10:09:35 CST 2006


By default, div's are 100% so I don't see why this is being specified.
Secondly, there is a discrepancy between IE's interpretation of the box
model and the W3C standard. To avoid any issues with IE, don't specify both
a width and padding/margin. If you want a 4px padding, eliminate the 100%
width (which actually you don't need anyway as I stated above).

Jules

On 07/12/06, ben morrison <morrison.ben at gmail.com> wrote:
>
> On 12/7/06, Joel D Canfield <joel at spinhead.com> wrote:
> > > Ahh! I missed the float on the a element. That changes things a lot.
> >
> > indeed.
> >
> > removed the float from the 'a', changed the container's text-align to
> > 'left' instead of 'center' (how'd that get there? I still want to sort
> > out why virtually the same setup is working for me on other sites, but
> > not right now.)
> >
> > a little bit of hover and .currentpage tweaking, and it now looks the
> > way I expected in the FF 2, IE 6 & 7, and NN 7 & 8. In Opera 8 & 9, the
> > header isn't floating to the left; have to fix that.
>
> The header is too wide for the page, a horizontal scrollbar now appears.
>
> #header {
> width:100%;
> padding:4px;
> }
>
> this equates to: 100% + 8px;
>
> You should remove the horizontal padding and apply it to its children
> as a margin/padding.
>
> ben
>
> --
> Ben Morrison
> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>



-- 
Website: http://jrickards.ca
Blog: http://pen-and-ink.ca
E-mail: julian dot rickards at gmail dot com



More information about the thelist mailing list