Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Style Sheets - rRrRr!

Status
Not open for further replies.

johnmak

Programmer
Apr 7, 2003
51
0
0
GB
Ok guys.

First Off - Am i right in saying the difference between a class and a style sheet is that a class is just in that particular page?

I have added a new style sheet. I have added (none) properties to all the hover,active and visited for the CSS selectors! In the link properties i have changed the text colour to a different colour. But when i test the page the visited links change to a purple colour!! rrr why is it doing this? As i have changed the visited to a none colour propertie!

Can someone please help me out?
 
have you linked to your stylesheet using

<LINK REL=&quot;STYLESHEET&quot; TYPE=&quot;text/css&quot; HREF=&quot;stylesheet.css&quot;>

[Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
Hi John,

it's really important for you put them in the right order, otherwise you'll not get the results you expect.

Change your stylesheet order to:

link
visited
hover
active

hopefully this'll sort you out.

Digga

Sharing Knowledge Saves Valuable Time!
 
John,

'Class' tells the browser to look in a style sheet for directions. 'Style sheet' is typically used to refer to a separate file (it's an old term from print publishing used to describe a doc listing standards for layout, font, etc.), but can also be embedded in the head section of the doc, or inline in the tag.

A good way to get the <a> tag to behave as you want is to style the whole tag first with 'global' properties:

In the DW CSS editor, 'new css style' then click radio button for 'redefine html tag'. Choose 'a' from the dropdown list and then choose your poisons.

Then, 'new css style' again, but this time choose 'use css selector'. Choose the <a: > you wish to work on and do your thing.


Your style sheet will come out looking something like:

a {
color:black;
text-decoration:none;
font:12px/1.5em bold Verdana, sans-serif;
}

a:visited {
color:red;
{

a:hover {
text-decoration:underline;
}



Hope this helps...
 
P.S.

If you cut/paste the above it most certainly won't work because I got the curly brace backward on the a:visited.

rRrRrR!

:)
 
Ok thanks for your help guys much appreciated.

Another quick question how many style sheets are you guys using? Is it possible to just use one style sheet for a whole website and just use different class's from that one particular style sheet?

Thanks for the help so far though.
 
yes thats how its primarily done

you can have different style sheets say one for the site then one for the printing properties for the site should a user want to print a page. but all you need is one sheet

[Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top