1 reply [Last post]
MoLang
Offline
newbie
Last seen: 4 years 5 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
Waco, TX
Last seen: 2 years 13 weeks ago
Waco, TX
Timezone: GMT-6
Joined: 2008-08-15
Posts: 2634
Points: 1552

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


First basic few steps in building a webpage
1. Gather and collect content.
2. Organize the content into meaningful semantic valid HTML
3. Design the prototype
4. Style using CSS

http://www.pixelbehavior.com