Jump to content

code does not want to centre?


helloise
 Share

Recommended Posts

i have this code and tried a few things but nothing wants to centre it in IE7?? all is ok with chrome and FF

<div id='div_phone_big'></div><div id='div_longgray_gradient'><form>   <table class='menu_bar_table' width='100%'>   <br></br>   <tr>	 <center>		 <span class='spn_big_lightblue_rbc'>RAINBOW</span><span class='spn_big_black_rbc'>CODE</span>	 </center>   </tr>   <br></br>   <tr>	 <center>		<span class='spn_med_yellow_rbc' >THANK YOU,YOUR FORM HAS BEEN SUBMITTED</span>	 </center>   </tr>   </table></form></div>the two span tags have no alignment set in the CSSwhat am i doing wrong please?thank you

Link to comment
Share on other sites

Your table doesn't have <td> tags

<table>  <tr> <-- table row	<td> <-- table cell in row </td>  </tr></table>

And then use text-align="center" for <td>

Link to comment
Share on other sites

why not just ditch the table since you are already using div's? To center a div, give it a width and margin: 0px auto. to center inline elements within it, use text-align: center on the div.

Edited by thescientist
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...