CSS not working on id on jsp -
on jsp page outputtext
tag when use id, css style sheet doesn't pick on it, when change class works.
jsp:
<h:outputtext id="namelabel" value="name:" />
css:
#namelabel { font-weight: bold; }
when used id parent <h:form>
make font bold whole form, don't understand difference, explain? feel im missing obvious..
at moment not problem, im wondering future reference if wanted give unique css rules particular outputtext
, or add class rule it? suppose im asking best practice here too.
im using ajax, netbeans , deploying glassfish.
jsf change id of input box component. id changed following form
form_name:component_id
use following code styles
form_name\:id
ex:
<h:form name="testform"> <h:outputtext id="namelable" value="name:" /> </h:form> <style> #testform\:namelabel{ font-weight: bold; } </style>
Comments
Post a Comment