Jump to content

Page has set link effects.How do I incorporate separate effects for other links?


CIMulation

Recommended Posts

Page has set link effects. How do I incorporate separate effects for other links within the same page?  For instance, the links are currently in red and underlined.  When you rollover them, they turn blue.  What I want to do is add more links, but have those links be displayed in white and turn yellow when rolled over.  Not sure if it makes anything worse, but this is on my PHP store page as well.  Sorry if this is a noob question.  I'm really new to this.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
a:link {
color: #F00;
}
a:visited {
color: #F00;
}
a:hover {
color: #FFF;
}
a:active {
color: #F00;
}
-->
</style></head>
<style type="text/css">
<!--
a.external:link  {color: #00F; font-size: 18pt; font-weight: bold; }
a.external:visited {color: #00F; font-weight: bold; }
a.external:hover {text-decoration: overline; background-color: #003399; }
a.external:active {color: #00F; } 
-->
</style></head>

<body>
<a href="www.msn.com">Home</a>

<div class="external">
<a href="www.msn.com/sports">External</a>
</div>

</body>
</html>

Link to comment
Share on other sites

This should be posted in the CSS section just fYI.

 

In CSS when you wanty to define separate element proprieties you do it like so.

 

a {
Posititon: relative;
left: 100 px;
}

 

Lets say you have a DIV wityh an ID tag of 'myDiv'

 

You declare styuff for it like so.

 

#myDiv{
position: relative;
left: 100 px;
background: black;
}

 

So let's say you won't to style all the a elemets that are child elemets in the  'myDiv' div.

That is to say, all <a> elements that are 'IN' in div.

 

You style the CSS like so.

 

#myDiv a {
position: relative;
}

 

Say you have a bunch of divs with the class value of childDivs in your myDiv. You style them like so.

#myDiv .childDivs {
display: inline ; 
Whatever : whatever;
}

 

I hope this gives you a basic understanding of the way child CSS selectors work.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.