wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Applying CSS to only specfic section Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Applying CSS to only specfic section" Watch "Applying CSS to only specfic section" New topic
Author

Applying CSS to only specfic section

Rajesh Khan
Ranch Hand

Joined: Oct 16, 2011
Posts: 230
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

Joined: Jan 10, 2002
Posts: 61314
    
  66

<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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rajesh Khan
Ranch Hand

Joined: Oct 16, 2011
Posts: 230
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 ??
 
GeeCON Prague 2014
 
subject: Applying CSS to only specfic section