Previous Message
Next Message

RE: [css-d] golden rules

Sent by Alan K. Gay on 16 December 2002 17:05


> > At one end of the spectrum, by making minimal use of padding and
border
> > (ie setting their dimension to zero) and not relying on
pixel-perfect
> > alignment between block-level elements, you can usually ignore
> > cross-browser box-model differences entirely.
> 
> Is this acheivable. My golden rule idea is a vanilla flavor, that
works
> cross browser. I am guessing that this first approach uses float and
or
> absoulte positioning. Does this limit the complexity of the design
> template. IE can this approach permit vanilla designs with multiple
> colums,
> nested divs etc.

If you set border:0px and padding:0px, then the width and height issues
go away.  So a vanilla rule to always use zero border and padding makes
sense if you are trying to eliminate cross-browser issues... it's just
awfully confining to almost any design.


> 
>
========================================================================
==
> =
> ===
> >
> > At the other end, SNIP
> 
> >From this I deduce that you feel that padding is not a postioning
tool
> but
> a visual one. you don't mention margins. I guess I get confused
because
> you
> can move a box around by changing any of the parameters. border (width
> height) line-height, margin, padding, float and absolute positioning.
> 
> If what you are saying holds true some of these should be reserved for
> visual presentation and others for positioning.
> 
> so knowing this difference could be a rule.
> 
> (the interaction of many things effect position, but if I remove from
my
> bag of tricks things that are not ment to be for positioning maybe I
will
> gain some consistancy???)
> 

I don't think you can peel this apart.  Padding and border, when
present,  effect positioning, and can be used for visual if you give
them color.   IE prior to 6.0/strict incorrectly includes them inside
"width"... correct implementation is that they are outside width.  So
for IE <6, total width=width+margin(s).  For compliant browsers, total
width=width+padding(s)+border(s)+margin(s).  Ditto for height.

> 
> 
>
>=======================================================================
==
> =
> ==
> > So.... my SNIP
> 
> Ok good, but is there a way to make a vanilla that side steps the
issue of
> browser issues.
> It could be the answer is no. But at least it will be possible to pin
the
> factors down a bit.

See above.
Previous Message
Next Message

Message thread: