Copy link to clipboard
Copied
I have a table set up and have the BG color and so forth ready but cannot figure out how to make a text link inside of the table have stylized link effects in it. Here is what I have. I thought that because I included the link styling in the #mm part it would work. Any help is appreciated thank you.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
#mm {
color: #ffffff;
background-color: #1f4d81;
a:link {
color: #ffffff;
text-decoration: none;
}
a:visited {
color: #ffffff;
text-decoration: none;
}
a:hover {
color: #ffffff;
text-decoration: underline;
}
a:active {
color: #ffffff;
text-decoration: underline;
}
</style>
</head>
<body>
<br/>
<table width="100%" id="mm" border="0" cellspacing="20" cellpadding="20">
<tbody>
<tr>
<td width="4%" align="center" valign="middle">
<img width="76" height="69" src="mm-logo.png" alt=""/>
</td>
<td width="96%" align="left" valign="middle">Some white text here
<a href="page.html" target="_blank" style="text-decoration: underline;">Click here to join the conversation</a></td>
</tr>
</tbody>
</table>
</body>
</html>
You're missing an ending } for your #mm id.
#mm is the <div>
a:whatever is written after (overwrites) and specifically targets the links.
"#mm a:whatever" as a selector will probably get you where you want to be. (affecting only the links inside the <div id="mm">)
Remove the inline css from the link, inline will (almost) always overwrite the external sheet or <head> css.
If you want all the text to be white, and have an underline show up on :hover or while being clicked with :active (I think what you
...Copy link to clipboard
Copied
You're missing an ending } for your #mm id.
#mm is the <div>
a:whatever is written after (overwrites) and specifically targets the links.
"#mm a:whatever" as a selector will probably get you where you want to be. (affecting only the links inside the <div id="mm">)
Remove the inline css from the link, inline will (almost) always overwrite the external sheet or <head> css.
If you want all the text to be white, and have an underline show up on :hover or while being clicked with :active (I think what you're going for?), this is how I would change your code...
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
#mm {
color: #ffffff;
background-color: #1f4d81;
}
#mm a {
color: #ffffff;
text-decoration: none;
}
#mm a:visited {
text-decoration: none;
}
#mm a:hover {
text-decoration: underline;
}
#mm a:active {
text-decoration: underline;
}
</style>
</head>
<body>
<br/>
<table width="100%" id="mm" border="0" cellspacing="20" cellpadding="20">
<tbody>
<tr>
<td width="4%" align="center" valign="middle"><img width="76" height="69" src="mm-logo.png" alt=""/></td>
<td width="96%" align="left" valign="middle">Some white text here <a href="page.html">Click here to join the conversation</a></td>
</tr>
</tbody>
</table>
</body>
</html>
Copy link to clipboard
Copied
Really appreciate it thanks so much!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more