[thelist] why doth i hate css? let me count the ways.
Joshua Olson
joshua at waetech.com
Thu Oct 9 19:18:49 CDT 2003
----- Original Message -----
From: "Chris W. Parker" <cparker at swatgear.com>
Sent: Thursday, October 09, 2003 7:36 PM
> 1. Why is there 'font-family' and 'font-weight' but no 'font-color'?
There is, but it's just called "color"
> 2. With the following html:
> <input class="submit" type="submit" value="Submit"/>
> Why doesn't the following css do what it SHOULD do? How should it work
> you ask? Well it should push the button over to the far right of it's
> container. What happens instead? Nothing. And what happens if I use
> text-align: right;? THE WORD SUBMIT IS ALIGNED RIGHT!! aarggh!
> input.submit {
> align: right;
> }
Think of the button as a container. The label, aka the "word", is text
within that container. What you are looking for is called "float", which
aligns the container within the parent.
> 3. Why is it that when I specify 'width: 200px; padding: 5px;' on a
> <div> I end up with a box that is 210px wide and not 200px? (Technically
> I know why. I just think it's a really stupid way to make things work.)
Six one half dozen the other I suppose. I prefer IE's box model in same
cases for this reason. This is really only a problem when you are trying to
do stuff with percentages and ems as the units. As a rule, don't apply
padding and margin to any elements that also have width specified and life
will become a lot easier. Embed another container within that (but don't
specify width so it'll fill the whole container) and assign it a margin,
padding, whatever.
> 4. Why can't I easily and with one command center anything vertically?
> (The following code should work like I would expect it to. Not because
> I'm demanding or anything but because IT JUST MAKES SENSE!)
This part of css truly, truly, sucks. I guess we'll have to deal for now.
> 5. And along the lines of #4, why can't I make a box stretch 100%
> vertically?
Again, I'm sure a better solution will come around.
<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com
706.210.0168
More information about the thelist
mailing list