Log in

View Full Version : textfield css specificity issue



Java Developer
12-09-2008, 04:21 AM
Hi,

I am using nitobi components and its input definition seems to override my textfield definition. I amn't able to get a higher specificity for the definition below.



/* css defined within nitobi */
.nitobi input, .nitobi textarea, .nitobi select, .nitobi ntb-input {
color:#333333;
font-family:Tahoma, Arial, Verdana;
font-size: 12px;
border:0px solid #000000;
padding:0px 2px 0px 4px;
width: 100px;
}

/* css defined by me*/
.basic, textfield .basic, .nitobi textfield .basic, .nitobi input .basic{
border-width: 1px;
border-style: solid;
border-color: #999999;
background-repeat: repeat-x;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #333333;
width: 200px;
height: 15px;
}

<s:textfield label="" name="" id = "" size="15" maxlength="15" cssClass="basic" cssStyle="basic"/>

Snookerman
12-09-2008, 07:45 AM
I have no idea what nitobi is so I might be wrong here, but try putting this: textfield .basic together like so: textfield.basic.

Java Developer
12-09-2008, 08:27 AM
Thanks for your help.

But this also does not seem to work. Here are a few options that I have tried

#mandatoryID1, textfield.basic, .nitobi textfield.basic, .nitobi input .basic for

<s:textfield label="" name="" id = "mandatoryID1"
cssClass="basic" cssStyle="basic"/>

What is strange is that couple of months ago I had a similar problem and I was able to override

.nitobi td with .nitobi td .value (where .value is the class)

Yet I am unable to override

.nitobi input with .nitobi input .basic (unless cssClass="basic" behaves differently)

You should try out nitobi, it is pretty impressive. The only issues that I have faced so far was w.r.t stylesheets but apart from that it saves a lot of development effort.

Snookerman
12-10-2008, 12:31 PM
Unfortunately I don't any knowledge about nitobi so I don't think I can help you, maybe someone else that does will help you. Since this is not regular css, I suggest you ask a moderator to move your thread to the "other" thread (http://www.dynamicdrive.com/forums/forumdisplay.php?f=12) and that you specify in you thread title that this is related to nitobi.