• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applying CSS to only specfic section

 
Rajesh Khan
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi suppose i have the following code



How can i select all <input> tag elements inside the myform inside the forma div.
I could do something like


Anyway in which i could specify that select all the input boxes inside the form having id=myform and inside a div having id=diva ??
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<div forma class="classa" id="diva">

What is "forma" here? A custom attribute? If so, it should be named using the data- prefix.

If not, what is it supposed to be?

In any case, if you only want to affect input elements within this <div> you can do so with either of:

or

 
Rajesh Khan
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In some place i have come across
<style type="text/css">
p.class {...}
</style>

Does that mean in class p select all the p tags ?? if so the in my example why doesnt input.classa work ??
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic