Jump to content

centering text in a div.. valign center


brown2005

Recommended Posts

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> &#153;</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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.