Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2014-01-16, 08:05 PM   #1
jollyhumper
That's what she said
 
jollyhumper's Avatar
 
Join Date: Feb 2012
Location: Norway
Posts: 2,487
Send a message via ICQ to jollyhumper
CSS question

I've been trying to find out how I did this before, but my mind is blank.

In a CSS file I would like the different links (ie recips, enter and sponsor) to behave differently, size, color, weight etc.

But I can't make it work. I thought I knew this, obviously not.
What style property is correct for overriding those A:link and all that?

(Getting older I guess )


Jolly
jollyhumper is offline   Reply With Quote
Old 2014-01-17, 04:10 AM   #2
pc
Shift Out / X-On
 
pc's Avatar
 
Join Date: Jul 2007
Location: unknown
Posts: 2,298
Send a message via ICQ to pc
There are few ways to accomplish this, but all is related and works the same way.
If your recips are just simple links then you can add a.class to a link like this

Code:
<a href="http://www.domain.tld" title="title" class="class">Title anchor</a>
and in the css file you just specify this class

Code:
a.class{
font-size:normal;
font-seight:400;
color:black
etc etc
}
a.class:hover{
font-size:normal;
font-seight:700;
color:red
etc etc
}
or you can specify certain div elements to behave differently like ex:

Code:
<div id="container"><a href="http://www.domain.tld" title="title">Title anchor</a></div>
Code:
#conatiner a{
font-size:normal;
font-seight:400;
color:black
etc etc
}
#conatiner a:hover{
font-size:normal;
font-seight:700;
color:red
etc etc
}
Make note that I used id to the div but most common practice and safe would be using classes. ID's could be additional elements inside of a class elements to specify dynamic actions ex using Jquery.

Usually if I don't know something regarding coding then Google is my friend , like this

Hope that helps.

Last edited by pc; 2014-01-17 at 04:12 AM..
pc is offline   Reply With Quote
Old 2014-01-17, 04:34 AM   #3
jollyhumper
That's what she said
 
jollyhumper's Avatar
 
Join Date: Feb 2012
Location: Norway
Posts: 2,487
Send a message via ICQ to jollyhumper
Thank you so much for a thoroughly reminder!

Very much appreciated. If greenguy build in a feature where I could give you a lottery-ticket in return (the so far unknown lottery-ticket button)
I would press twice

Have a great day
Jolly
jollyhumper is offline   Reply With Quote
Old 2014-01-22, 01:11 PM   #4
flowersgone
Are you sure you're an accredited and honored pornographer?
 
Join Date: Sep 2008
Posts: 67
I think the thing you are asking about is technically called a "css selector". A css selector seems to tie a css rule and its style declarations to the HTML elements you are trying to style. You can learn more by googling for "css selector" and at some of the links below:

http://www.w3schools.com/css/css_syntax.asp
https://developer.mozilla.org/en-US/...ed%2FSelectors
http://www.w3schools.com/cssref/css_selectors.asp
__________________
Thank you for checking out my:
Portfolio and Tech Services
flowersgone is offline   Reply With Quote
Old 2014-01-22, 01:25 PM   #5
jollyhumper
That's what she said
 
jollyhumper's Avatar
 
Join Date: Feb 2012
Location: Norway
Posts: 2,487
Send a message via ICQ to jollyhumper
Thanks for the tip!
The reason why what I tried to achieve didn't work was use of numbers in class-names.
I even knew it, just forgot over the years

Jlly
jollyhumper is offline   Reply With Quote
Reply


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

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

Forum Jump


All times are GMT -4. The time now is 06:12 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc