brown2005 Posted March 13, 2008 Share Posted March 13, 2008 i have this echo" <div id='header-bar'> <div class='logo'><a href='$config_website_url/$config_website_url_topic/index.php?page=home'>fantasy-comps.com</a> ™</div> <div class='banner'><img src='' width='468' height='60' /></div> </div>"; and then i have #header-bar { background-color: #f00; overflow: auto; } #header-bar .logo { float: left; padding: 15px 10px 15px 10px; } #header-bar .banner { float: right; } and the main text code is font: 76%/160% "Arial", Tahoma, Verdana, sans-serif; font-weight: bold; with the a in the header is #header-bar a { font-size: 1.75em; } what i want to know.. is there a simple way of centering the div text in the middle of the bar vertically. Link to comment https://forums.phpfreaks.com/topic/95976-centering-text-in-a-div-valign-center/ Share on other sites More sharing options...
gruzaw Posted March 17, 2008 Share Posted March 17, 2008 i had some issues with valign.. you can just put another div inside that one and do something like style='top:50%' Link to comment https://forums.phpfreaks.com/topic/95976-centering-text-in-a-div-valign-center/#findComment-493878 Share on other sites More sharing options...
soycharliente Posted March 17, 2008 Share Posted March 17, 2008 Set the line height equal to the height of the div. That will only work for one line though. Link to comment https://forums.phpfreaks.com/topic/95976-centering-text-in-a-div-valign-center/#findComment-494170 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.