|
INTERVIEW QUESTIONS
WEB
CSS
DETAILS
Question: How can I specify two different sets of link colors?
Answer: By classifying each set of links and then attaching desired color to each set. CSS: <style type="text/css"> <!-- A.set1:link {color: some_color; background: some_background_color} A.set1:visited {color: some_color; background: some_background_color} A.set1:active {color: some_color; background: some_background_color}
A.set2:link {color: some_color; background: some_background_color} A.set2:visited {color: some_color; background: some_background_color} A.set2:active {color: some_color; background: some_background_color} --> </style>
You can name set1 and set2 any way you like as long as the names are made up of letters a-z, A-Z, digits 0-9, period, hyphen, escaped characters, Unicode characters 161-255, as well as any Unicode character as a numeric code. Note: to avoid conflict with user's settings a background property (background color) should also be specified together with the color property (foreground color).
|
|
|
Category |
CSS Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 6962 users |
Added on |
9/4/2014 |
Views |
69044 |
Rate it! |
|
|
Question:
How can I specify two different sets of link colors?
Answer:
By classifying each set of links and then attaching desired color to each set. CSS: <style type="text/css"> <!-- A.set1:link {color: some_color; background: some_background_color} A.set1:visited {color: some_color; background: some_background_color} A.set1:active {color: some_color; background: some_background_color}
A.set2:link {color: some_color; background: some_background_color} A.set2:visited {color: some_color; background: some_background_color} A.set2:active {color: some_color; background: some_background_color} --> </style>
You can name set1 and set2 any way you like as long as the names are made up of letters a-z, A-Z, digits 0-9, period, hyphen, escaped characters, Unicode characters 161-255, as well as any Unicode character as a numeric code. Note: to avoid conflict with user's settings a background property (background color) should also be specified together with the color property (foreground color). Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
How do you show which page you're on (in a menu)?
|
View Answer
|
|
How do you override the underlining of hyperlinks?
|
View Answer
|
|
If one were to set Text and Link colors using a style sheet, should one also define the background colors for these elements as well?
|
View Answer
|
|
Why are there gaps above and below my form in IE?
|
View Answer
|
|
How does a simple CSS style rule look ?
|
View Answer
|
|
How does a simple CSS style rule look ?
|
View Answer
|
|
How do I move the list bullet to the left/right?
|
View Answer
|
|
I want my page fonts to look the same everywhere as in… a) Why are my font sizes different in different browsers ? b) Why are my font sizes different on different platforms ?
|
View Answer
|
|
Can you use someone else's Style Sheet without permission?
|
View Answer
|
|
How do I place two paragraphs next to each other?
|
View Answer
|
|
I made a 10px-high div, but IE makes it 20px high...
|
View Answer
|
|
To what are partial URLs relative?
|
View Answer
|
|
Do URL's have quotes or not?
|
View Answer
|
|
Why can @import be at the top only?
|
View Answer
|
|
Justified Text?
|
View Answer
|
|
Do any WYSIWYG editors support the creation of Style Sheets? Any text-based HTML editors?
|
View Answer
|
|
Must I quote property values?
|
View Answer
|
|
How do I centre my page?
|
View Answer
|
|
What is the percentage value in 'font-size' relative to?
|
View Answer
|
|
Can I attach more than one declaration to a selector?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All CSS Interview Questions & Answers - Exam Mode /
Learning Mode
|