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

What is the S/W model used in the project. What are the optimization techniques used. Give examples ?

2 Answers   Infosys, Symphony, Wipro,


Why is singleton used?

0 Answers  


What is the builder pattern?

0 Answers  


What is the singleton design pattern?

0 Answers  


What are the most popular design patterns?

0 Answers  






What is difference between function oriented design and object oriented design?

0 Answers  


In which application lifecycle phases is an application architecture produced?

1 Answers   Microsoft,


What is the publish/subscribe model?

1 Answers  


What is software 'quality'?

2 Answers  


What is singleton design pattern in java?

0 Answers  


4. Identify and bound the SOI’s Operating Environment.

0 Answers  


Can we use an equated value as operands for an MVC ? Reason for the same.

0 Answers   Ness Technologies,


Categories