当前位置: 动力学知识库 > 问答 > 编程问答 >

html - Can't use hex codes for coloring <a> tags?

问题描述:

HTML:

<!doctype html>

<html>

<head>

<link rel="stylesheet" type="text/css" href="css.css">

<title>Register to Continue</title>

<!-- saved from url=(0014)about:internet -->

<!-- Code above created to stop the IE9 Active X/Scripts Disabler -->

</head>

<body>

<div id="main" class="main">

<table class="container1">

<tr>

<td><p><img src="images/doesitfit.png" alt=""></p></td>

</tr>

</table>

<div class="container2">

<form accept-charset="utf-8"

action="https://app.getresponse.com/add_contact_webform.html"

method="post">

<input type="text"

placeholder="Enter Your First Name"

class="form"

name="name"><br/>

<input type="text"

placeholder="Enter Your Email"

class="form"

name="email"><br/>

<input type="text"

placeholder="Enter Your Phone Number"

class="form"

name="phone"><br/>

<input type="submit"

class="button"

name="submit"

value="">

<input type="hidden"

name="webform_id"

value="540572" />

</form>

<footer id="footer">

<a href="http://armored-media.com/">Armored Media</a> |

<a href="http://intrack.us/ihs/">Internet Hustler Society</a> |

<a href="http://intrack.us/ms/">Magic Submitter</a> |

<a href="http://intrack.us/contact/">Contact</a>

<script type="text/javascript"

src="http://app.getresponse.com/view_webform.js?wid=540572&mg_param1=1"></script>

<script type="text/javascript"

src="http://app.getresponse.com/view_webform.js?wid=540572&mg_param1=1"></script>

</footer>

</div>

</div>

</body>

</html>

CSS:

.main {

background-color : rgba(11, 11, 11, 0.8);

width : 800px;

height : 550px;

border-radius : 15px;

margin-left : auto;

margin-right : auto;

min-height : 10em;

height : 100%;

overflow : hidden;

}

.container1 {

table-layout : fixed;

height : 50%;

overflow : hidden;

width : 802px;

border-color : #ff0000;

border-radius : 15px;

margin-left : auto;

margin-right : auto;

min-height : 10em;

color : white;

margin : auto;

}

.form {

font-size : 19px;

border : solid 0;

color : #7a7a7a;

height : 28px;

width : 295px;

text-align : center;

margin : 0 auto;

display : block;

border-radius : 15px;

border : none;

outline : none;

}

.button {

border : none;

background : url('images/button.png');

background-repeat : no-repeat;

height : 102px;

width : 339px;

border-radius : 15px;

display : block;

margin-left : auto;

margin-right : auto;

}

a:link {

color: yellow;

font-size : 18px;

text-decoration : none;

}

a:visited{

color: yellow;

font-size : 18px;

text-decoration : none;

}

a:active{

color: yellow;

font-size : 18px;

text-decoration : none;

}

footer {

text-align : center;

}

Whenever I use hex code values for my tags in CSS, it never works. They just go back to blue. I've used hex codes before, but why is it not working this time? Using the default color names do not help me much in my effort to style them good.

网友答案:

By adding

a {
    color: #f4f7f8;
}

Hex worked correctly

Fiddle: http://jsfiddle.net/9xmRN/

分享给朋友:
您可能感兴趣的文章:
随机阅读: