After all that "I'm so great" in my post yesterday, I figured today would be a good time to show off how little I know about most things. :)
I'm an HTML/CSS neophyte. I can manage a basic page okay, but fancy-pants layout is well beyond me. CSS, in particular, is a topic whose further reaches I've never explored. Heck, I've barely wandered a few feet from its parking lot. (Although the FireFox
EditCSS extension has made my HTML look
loads better by making it easy to experiment.)
One of the things I always have trouble with is figuring out how to center stuff. I'll slap a text-align: center on things sometimes, but that doesn't always accomplish what I want. So today I ran across this little nugget:
.centered80
{
position: absolute;
left: 10%;
right: 10%
}
It gives me the ability to center something in the middle 80% of the page. It worked so well I wanted to record it here for my own future reference. I'm sure anyone that has spent any time with CSS already knows this (or a better version), but at least now I can find it again when I need it.
Posted
Aug 24 2005, 07:04 AM
by
craig-andera