[UPHPU] More CSS frustration

Jacob Wright jacwright at gmail.com
Mon Jan 15 10:03:44 MST 2007


> > for example the following does not vertically center the title (at
> > least on my firefox 2.0 browser)
>
> To get your headline in the middle of that field, you will need to
> use line-height, padding, or margin (or a combination).
>
>
Actually, Wade is right. I've usually found line-height to work better for
me for text.

/*====== title bar ===== */
#header {
   height: 50px;
   padding: 5px;
   background-color: #333399;
   color: #FFFFFF;
   line-height: 50px; /* will make the text position in the v-center of the
50px, and won't have to tweak padding if font size changes */
}

-- 
Jacob Wright
Within Code LLC


More information about the UPHPU mailing list