1 reply [Last post]
MoLang
Offline
newbie
Last seen: 4 years 19 weeks ago
Timezone: GMT+1
Joined: 2010-03-18
Posts: 1
Points: 2

Hi,

I´ve been trying to let a links list to look like a list of buttons using css. It doesn´t work like I wish

<html>
<head>
<title>Document Title</title>
 
<style TYPE="text/css">
 
<!--
 
body{
text-align: center;
}
 
#buttonlike{
font-weight:bold;
background:#069;
color:white;
width:50%;
padding:0.5em 0;
font-size:2.5em;
margin: 0.5em auto
}
 
#buttonlike:hover{
background:#028dd2;
border-color:#069;
color:#FFF
}
 
-->
</style>
 
</head>
 
<body>
 
<p id="buttonlike"> <a href="index.html">One</a> </p>
<p id="buttonlike"> <a href="index.html">Two</a> </p>
<p id="buttonlike"> <a href="index.html">Three</a> </p>
 
</body>
</html>

The font color is not white... Why?

Thanks!

CupidsToejam
CupidsToejam's picture
Offline
Guru
Florida
Last seen: 7 weeks 19 hours ago
Florida
Timezone: GMT-4
Joined: 2008-08-15
Posts: 2636
Points: 1554

for starters, lets validate

for starters, lets validate the code! You have three things with the same ID. Now, to get the text white, we have do it like this, since these are links and not standard text.

a:link {color: white;}