File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Radio button loosing it�s CSS 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 "Radio button loosing it�s CSS" Watch "Radio button loosing it�s CSS" New topic

Radio button loosing it�s CSS

Rafael Andrade

Joined: Aug 04, 2006
Posts: 15
I�m using a CSS style (line1) in a radio button, to add borders to the line. But when I click on it, it looses it�s CSS, and becomes a normal radio button, without any CSS, centered left, and without center align. Anybody had this problem? The code of the JSP is as follows:

<td class="line1">
<html:radio property="idCity" value="${}"/>

here is the CSS:
text-align: center;
border-top: 1px solid;
border-right: 1px solid;
border-color: #B0B0B0;

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63548

The source code of the JSP, especially with un-rendered Struts tags, is not particularly interesting.

Do a View Source in the browser to show us the HTML that really being sent to the client.

[Asking smart questions] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63548

P.S. It's also a good idea to use UBB code tags when posting code fragments in order to preserve any formatting.
Subhadip Chatterjee
Ranch Hand

Joined: Dec 12, 2006
Posts: 93
Hi Rafael,
what i can suggest is, if you are using that style-sheet only for that radio button, then instead of applying it on TD you can pass it onto RADIO like this: <html:radio styleClass="the_style_class">. I hope you know this. If this doesn't work, then you might be changing the style class somehow, on click of radio button.

Refreshing life every moment...
I agree. Here's the link:
subject: Radio button loosing it�s CSS
It's not a secret anymore!