HighDots Forums  

Two boxes with diffrent Styles for <a href>

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Two boxes with diffrent Styles for <a href> in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Frank Reintgen
 
Posts: n/a

Default Two boxes with diffrent Styles for <a href> - 10-30-2004 , 05:19 AM






Hallo!
(Soory for my english ;-) )
I have create a style like this:

a:link { text-decoration:none; font-weight:bold; color:red; }
a:visited { text-decoration:none; font-weight:bold; color:#ff0033;}
a:hover { text-decoration:none; font-weight:bold;
background-color:#FFF000; }
a:active { text-decoration:none; font-weight:bold;
background-color:#CCFFFF; }

Also I have create a few boxes like:
#box1 { position:absolute; top:0px; left:0px; width:200px; height:200px;
z-index:1; background-color:#FFFccc; }

/* box 2 = Menuleiste */
#box2 { position:absolute; top:200px; left:0px; width:200px; height:auto;
z-index:2; background-color:#000666}


My Question:
is it possible to create a spezial Definition for a spezial box, so that in
box1 Links are coloured red (a:link {color:red; })
and in box2 Links are coloured blue

Frank



Reply With Quote
  #2  
Old   
Lachlan Hunt
 
Posts: n/a

Default Re: Two boxes with diffrent Styles for <a href> - 10-30-2004 , 05:54 AM






Frank Reintgen wrote:
Quote:
Also I have create a few boxes like:
#box1 { ... }

/* box 2 = Menuleiste */
#box2 { ... }

My Question:
is it possible to create a special definition for a special box, so that in
box1 links are coloured red (a:link {color:red; })
and in box2 links are coloured blue
Use styles like this:

#box1 a:link { color: red; }
#box1 a:visited { ... }
....
#box2 a:link { color: blue; }
....

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://SpreadFirefox.com/ Igniting the Web


Reply With Quote
  #3  
Old   
Frank Reintgen
 
Posts: n/a

Default Re: Two boxes with diffrent Styles for <a href> - 10-30-2004 , 08:34 AM



Lachlan Hunt wrote:

Quote:
Use styles like this:

#box1 a:link { color: red; }
#box1 a:visited { ... }
...
#box2 a:link { color: blue; }
Sorry but this doesn't work.

ButI try to use "classes" and this works:
a.box { text-align:center; text-decoration:none; vertical-align: top; }

a.box:link { color:blue; background-color:transparent; }
a.box:visited { color:blue; background-color:transparent; }
a.box:hover { color:blue; background-color:white; }
a.box:active { color:#ff0; background-color:#a03; }

Thank you for help

Frank
I Use cl


Reply With Quote
  #4  
Old   
Lauri Raittila
 
Posts: n/a

Default Re: Two boxes with diffrent Styles for <a href> - 10-30-2004 , 08:46 AM



in comp.infosystems.www.authoring.stylesheets, Frank Reintgen wrote:
Quote:
Lachlan Hunt wrote:

Use styles like this:

#box1 a:link { color: red; }
#box1 a:visited { ... }
...
#box2 a:link { color: blue; }

Sorry but this doesn't work.
Yes it does. You just had mistake somewhere, which we can't know whitout
URL. Are you sure you didn't change your html?

Quote:
ButI try to use "classes" and this works:
a.box { text-align:center; text-decoration:none; vertical-align: top; }

a.box:link { color:blue; background-color:transparent; }
a.box:visited { color:blue; background-color:transparent; }
a.box:hover { color:blue; background-color:white; }
a.box:active { color:#ff0; background-color:#a03; }
But now you need to add class to every A element. Not good idea.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.