How to add CSS styles Styles to Elements with Particular
Attributes?



How to add CSS styles Styles to Elements with Particular Attributes?..

Answer / swapna

The style rule below will match all input elements that has
a type attribute with a value of "text"
Input[type="text"] {background-color: blue}

id Selector

Defining styles for HTML elements with the id selector. The
id selector is defined as a #.
The style defined below will effect the element that has an
id attribute with a value of "green? ie., id=?green?
Ex: #green {color: green}
The style rule below will match the p element that has an
id with a value of "para1? ie., <p id=?para1?>
p#para1
{
text-align: center;
color: red
}
Do NOT start a class name or ID name with a number


Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More Design Patterns Interview Questions

If there is a Model class,View class,Controller class then How these are internally related? Which layer objects instantiated in which layer? How they communicates?

4 Answers   Honeywell,


Are you using singleton in your code?

0 Answers  


What is the behavioral design pattern?

0 Answers  


what is cascading order?

1 Answers  


What is universal design?

3 Answers  


When singleton pattern is used?

0 Answers  


What are creational design patterns?

0 Answers  


What are 5 common problems in the software development process?

1 Answers   HP,


Why do we need singleton pattern?

0 Answers  


What are the additional productivity features and enhancements included with Quartus II software version 6.0?

0 Answers  


What is mvp design pattern?

0 Answers  


How to test the quality of design ?

1 Answers  


Categories