ndjustin20 Posted May 15, 2008 Share Posted May 15, 2008 Can someone tell me why the following code won't center the link $msg = '<a href="http://www.gaf.com/General/GafMain.asp?Silo=RES1&WS=GAF&App=ROOF&Force=shingle-lines.asp"> <font "color="#000066" size="+3"><center>GAF-ELK Shingle Styles & Colors</center></font></a>'; Quote Link to comment Share on other sites More sharing options...
soycharliente Posted May 16, 2008 Share Posted May 16, 2008 You need to center the link as a whole, not just the link's text. <center><a href="index.html">Home</a></center> Quote Link to comment Share on other sites More sharing options...
pquery Posted June 1, 2008 Share Posted June 1, 2008 or you could try to add: style="text-align:center;" inside your <a> tag (and maybe remove your <center></center> tags) OR if that doesn't work for all browsers slap a <div align="center> </div> around your link Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted June 1, 2008 Share Posted June 1, 2008 <div class="link"> <a href="http://www.gaf.com/General/GafMain.asp?Silo=RES1&WS=GAF&App=ROOF&Force=shingle-lines.asp">GAF-ELK Shingle Styles & Colors</a> </div> CSS: .link { text-align: center; } .link a { font-size: 16px; color: #000066; } Quote Link to comment Share on other sites More sharing options...
liamloveslearning Posted June 3, 2008 Share Posted June 3, 2008 is it in a table? you could try <td align='center'> Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted June 3, 2008 Share Posted June 3, 2008 is it in a table? you could try <td align='center'> This is a bad practice. First of all, you shouldn't be using tables. Second of all, you should use a class not inline css. Quote Link to comment Share on other sites More sharing options...
haku Posted June 4, 2008 Share Posted June 4, 2008 And to add to that, align has been deprecated. Quote Link to comment Share on other sites More sharing options...
soycharliente Posted June 4, 2008 Share Posted June 4, 2008 ...you shouldn't be using tables... Depends on the data! Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted June 4, 2008 Share Posted June 4, 2008 Depends on the data! --- V --- V --- V --- V --- V --- V --- V --- is it in a table? you could try <td align='center'> So I responded by saying that you shouldn't be using tables. Maybe it is tabular data, therefore I was mistaken, but I doubt that was the case. Quote Link to comment Share on other sites More sharing options...
pquery Posted June 12, 2008 Share Posted June 12, 2008 Plus the <center> tag is going away in HTML 5 Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted June 13, 2008 Share Posted June 13, 2008 Plus the <center> tag is going away in HTML 5 Isn't going to be an official HTML 5 release. The internet's governing body that sets up standards for online coding have stated that HTML 4.01 will be the last and final release of html. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.