jquery

gist JS

Saturday, September 09, 2006

Plea to the CSS Gods

oh css gods why have you forsaken me!

So css is the one true path. fine. I don't much care, but fine. I'll go with your standard.

Great, DIV's. I can make little boxes wherever I want coolio. Let's try to little 2 little red boxes, ten pixel on the side, touching corners. Easy right?

<div style="background-color: red; position: absolute; left: 200px; top: 200px; width: 10px; height: 10px; padding: 0px; padding-right: 0px;"/>
<div style="background-color: red; position: absolute; left: 210px; top: 210px; width: 10px; height: 10px; padding: 0px; padding-right: 0px;"/>

Whoa! Those corners aren't even close!
(At (200,200) on your screen there's a little red box. At (410,410) there's another)



hmm.. let me bash my head into a wall for 20 minutes. ok, that's better. how about:

<div style="background-color: black; position: absolute; left: 250px; top: 250px; width: 10px; height: 10px; padding: 0px; padding-right: 0px;"></div>
<div style="background-color: black; position: absolute; left: 260px; top: 260px; width: 10px; height: 10px; padding: 0px; padding-right: 0px;"></div>

ahhh... yes. I see. Closing the tag with another tag is the One True Path(tm) Shame on you who would assume that the way in which you close your tag should be completely friggin irrelevant to how it's layed out on the screen.






can anybody explain this to me?



No comments: