Re: [WSG] Can't assign links specific styles

2007-01-13 Thread David Dixon

Hi Skip,

Firstly, you'll save yourself a lot of coding if you trim those rules 
down a little. As you styling the general 'a' tag, then when styling 
a:hover etc, then you only need to add definitions for the changed 
styles. Also, since styling a:visited is not need when styling the 
general 'a' tag (a:visited, a:hover et al will all automatically have 
the general style until changes). eg:


a.pagelink {
   display: block;
   width: 6em;
   padding: .2em;
   line-height: 1.4em;
   background-color: #47afe2;
   border: 1px solid black;
   color: #000;
   text-decoration: none;
   text-align: center;
}

a.pagelink:hover {
   background-color: #369;
   color: #ff;
}

Also, not the the soltuion to your problem... you were defining a style 
that target a link tag inside an element with the class 'shoplogo', not 
a link with the class of shoplogo.


.shoplogo a {} -> my link

a.shoplogo {} -> a link

Thanks,

David.

Skip Evans wrote:

Hey all,

I'm a PHP/MySQL coder by trade, hence a bit green
with CSS, as this question will show.

I have two sets of style elements to style two
different kinds of links, as the code below shows.

.shoplogo a, a:visited {
  border: none;
  color: #000;
  background-color: #b9e4ff;
  text-decoration: none;
}

.shoplogo a:hover {
  border: none;
  color: #000;
  background-color: #b9e4ff;
  text-decoration: none;

}

.pagelink a, a:visited {
  display: block;
  width: 6em;
  padding: 0.2em;
  line-height: 1.4;
  background-color: #47afe2;
  border: 1px solid black;
  color: #00;
  text-decoration: none;
  text-align: center;
}

.pagelink a:hover {
  display: block;
  width: 6em;
  padding: 0.2em;
  line-height: 1.4;
  background-color: #369;
  border: 1px solid black;
  color: #ff;
  text-decoration: none;
  text-align: center;
}

And then I have code in an html file with the
following two lines, in different places.

http://shopstudios.com";>
 
   

FASHION

The problem is that both links take on the
properties of whatever style set, or specs for the
links, is listed last in the CSS file.

I would think since they have separate names, that
each would adhere to the properties of the one
they are called by.

I know to all of you this is trivial and you're
rolling your eyes, but I'm a bit confused.

Thanks,
Skip





***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Can't assign links specific styles

2007-01-13 Thread Gunlaug Sørtun

Cross-list answer... :-)

You have the class on the anchor itself - *not* the anchor inside an
element with the class.
Also I miss the :link pseudo-class.

You should write...

a.shoplogo:link, a.shoplogo:visited {
stuff
}

a.pagelink:link, a.pagelink:visited {
stuff
}

...etc.



regards
Georg
--
http://www.gunlaug.no


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



[WSG] Can't assign links specific styles

2007-01-13 Thread Skip Evans

Hey all,

I'm a PHP/MySQL coder by trade, hence a bit green
with CSS, as this question will show.

I have two sets of style elements to style two
different kinds of links, as the code below shows.

.shoplogo a, a:visited {
 border: none;
 color: #000;
 background-color: #b9e4ff;
 text-decoration: none;
}

.shoplogo a:hover {
 border: none;
 color: #000;
 background-color: #b9e4ff;
 text-decoration: none;

}

.pagelink a, a:visited {
 display: block;
 width: 6em;
 padding: 0.2em;
 line-height: 1.4;
 background-color: #47afe2;
 border: 1px solid black;
 color: #00;
 text-decoration: none;
 text-align: center;
}

.pagelink a:hover {
 display: block;
 width: 6em;
 padding: 0.2em;
 line-height: 1.4;
 background-color: #369;
 border: 1px solid black;
 color: #ff;
 text-decoration: none;
 text-align: center;
}

And then I have code in an html file with the
following two lines, in different places.

http://shopstudios.com";>

  

FASHION

The problem is that both links take on the
properties of whatever style set, or specs for the
links, is listed last in the CSS file.

I would think since they have separate names, that
each would adhere to the properties of the one
they are called by.

I know to all of you this is trivial and you're
rolling your eyes, but I'm a bit confused.

Thanks,
Skip


--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240

=-=-=-=-=-=-=-=-=-=-=

Check out PHPenguin, a lightweight and versatile
PHP/MySQL development framework.

http://phpenguin.bigskypenguin.com


--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240

=-=-=-=-=-=-=-=-=-=-=

Check out PHPenguin, a lightweight and versatile 
PHP/MySQL development framework.


http://phpenguin.bigskypenguin.com


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***