Jump to content
hena

header title not align to center

Recommended Posts

hi all,

 

i am new to developing,

 

i am trying to develop a site with the help of googling.

 

In my header title, its not aligning to center even if i give the property text-align:center

#header {	clear:both;	height:110px;	background-color:#fff;	}#site_title { 	float: left; 		margin: 25px 0 0 405px; 	}#site_title h2 { 	margin: 0; 	padding: 0;    color:#000;			}

waiting for the valuable inputs

Share this post


Link to post
Share on other sites

Since we have no html to work with, i'll just guess that the header is in the floated element, this element will shrink to content forcing it left.

<div id="header"><!--starts of header-->	<div id="site_title">	<h2>'IMPROVING HSE AT HOME'</h2>		  <img class="image_wrapper image_fr" src="images/Logo_lockup.jpg" alt="image"  /><br><br><br>	</div></div> <!-- end of header -->

Share this post


Link to post
Share on other sites

Looks like i was right! Mind you the massive left margin fixed width won't help either. This will cause a off centre container element and therefore an off centre header title.

  • Like 1

Share this post


Link to post
Share on other sites

Looks like i was right! Mind you the massive left margin fixed width won't help either. This will cause a off centre container element and therefore an off centre header title.

thanku for ur inputs.

Share this post


Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...

×
×
  • Create New...