Jump to content

code does not want to centre?


helloise

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.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...