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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.