This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 60794
    
  65

<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 ??
 
jQuery in Action, 2nd edition
 
subject: Applying CSS to only specfic section
 
Similar Threads
How to remove Textbox Element using DOM in HTML
JSP <a href> tags breaks page functionality
Jquery form validation
Preventing inheritance in a Div
request.getAttribute returning null