2 replies [Last post]
AaronInSH
AaronInSH's picture
User offline. Last seen 1 year 46 weeks ago. Offline
newbie
Timezone: GMT+8
Joined: 2010-03-14
Posts: 7
Points: 9

Hi Everyone,

I have made a couple Divs that are absolutely positioned in the header.
How can I style the text links in them?

Site - http://virgintees.com/

Here's the code I have so far -

<div style="position:absolute; top:57px; left:718px; width:85px; height:28px; padding:7px; color: #fff; font-size:26px;  background-color:#ED303C; 
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px; ">
 
Twitter
</div>

Deuce
Deuce's picture
User offline. Last seen 3 days 1 hour ago. Offline
rank Guru
Guru
Timezone: GMT-6
Joined: 2005-11-20
Posts: 4416
Points: 1835

Use a class or ID on the div

Use a class or ID on the div and don't use inline CSS and then just target it with that ID or class.

<div id="some-area"><p><a href="#">Link</a></p></div>
and

#some-area p a, #some-area p a:link { color: #000; text-decoration: none; border: 3px solid #f00; padding: 10px; }
#some-area p a:visited { color: #666; }
#some-area p a:hover, #some-area p a:active { border: 3px solid #00f; }

all ยป http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

AaronInSH
AaronInSH's picture
User offline. Last seen 1 year 46 weeks ago. Offline
newbie
Timezone: GMT+8
Joined: 2010-03-14
Posts: 7
Points: 9

that makes sense. will give

that makes sense. will give it a shot now. thanks!