| | |
Unable to apply style to div tags inside form
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jun 2009
Posts: 1
Reputation:
Solved Threads: 0
Hi All,
I hope my problem 'll get solved by posting my query here.
Actually I have div tag with this style.
If i give the div tags directly in the jsp its working fine,,
like this
but if i wrap it with the form tag its not working.
I donot know how to apply css for divs inside the form tag.
I want to hide the contents of div tag when placed inside the form.
How can i do that?
Appreciate any help
Thanks
I hope my problem 'll get solved by posting my query here.
Actually I have div tag with this style.
<style type="text/css">
.Box {
display:none;
}
.Box1 {
display:none;
}
</style>If i give the div tags directly in the jsp its working fine,,
like this
<s:select label="Occupation Type" id="Workselect" name="background.workType" headerKey="1" headerValue="--Please Select--" list="#{'S':'Pursuing Education','W':'Working Professional'}" />
<div class="Box">
<s:textfield label="Organization Name" id="ON" name="background.orgName" />
</div>
<div class="Box1">
<s:textfield id="IN" label="Institute Name" id="Iname" name="background.instName" />
</div>but if i wrap it with the form tag its not working.
<s:form action="Register" method="POST" enctype="multipart/form-data">
<s:select label="Occupation Type" id="Workselect" name="background.workType" headerKey="1" headerValue="--Please Select--" list="#{'S':'Pursuing Education','W':'Working Professional'}" />
<div class="Box">
<s:textfield label="Organization Name" id="ON" name="background.orgName" />
</div>
<div class="Box1">
<s:textfield id="IN" label="Institute Name" id="Iname" name="background.instName" />
</div>
</s:form>I donot know how to apply css for divs inside the form tag.
I want to hide the contents of div tag when placed inside the form.
How can i do that?
Appreciate any help
Thanks
HTML and CSS Syntax (Toggle Plain Text)
<style type="text/css"> .Box { display:none; } .Box1 { display:none; } </style> <s:form action="Register" method="POST" enctype="multipart/form-data"> <s:select label="Occupation Type" id="Workselect" name="background.workType" headerKey="1" headerValue="--Please Select--" list="#{'S':'Pursuing Education','W':'Working Professional'}" /> <s:textfield class="Box" label="Organization Name" id="ON" name="background.orgName" /> <s:textfield class="Box1" id="IN" label="Institute Name" id="Iname" name="background.instName" /> </s:form>
?? the code supplied is not html, check elsewhere than your inline code for other styles defining
<s:
elements,
try the sample code
Last edited by almostbob; Jun 17th, 2009 at 10:58 am.
Failure is not an option It's included free
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
If a script is changing the s tags into other tags, the styles will not apply. The styles are applied at the time the page originally renders.
The s tags cause a failure to render anything inside them, because html does not have an s tag. They also throw the browser into quirks mode.
The s tags cause a failure to render anything inside them, because html does not have an s tag. They also throw the browser into quirks mode.
Daylight-saving time uses more gasoline
![]() |
Similar Threads
- Putting two p or div tags horizontally aligned on same plane (HTML and CSS)
- Control 'LeftNav1_lnkCore' of type 'LinkButton' must be placed inside a form tag with (ASP.NET)
- get elements within a div tag (JavaScript / DHTML / AJAX)
- Dragging Div on Browser and show its Position (JavaScript / DHTML / AJAX)
- About DIV tags (HTML and CSS)
- How to have the div layer center on any browser? (JavaScript / DHTML / AJAX)
Other Threads in the HTML and CSS Forum
- Previous Thread: Works in Firefox not in Chrome/Safari
- Next Thread: Problems with IE - help appreciated
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7






