Jump to content

Link won't center


ndjustin20

Recommended Posts

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>';

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

<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;

}

Link to comment
Share on other sites

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.

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.