<fieldset> & CSS

L

luke

I'm trying to use an image as a background for a text input box.

<form>
<fieldset><input type="text" name ="blah" class="cheese"></fieldset>
</form>

I'm using this code as part of my css to overcome a background repeat bug in
IE 5/6.

fieldset>input.textfield {
background: transparent
url("image.jpg") no-repeat;
}


This works great. The only problem I have now is that it seems the
<fieldset> tag is causing problems in Opera. Is there any way I can ditech
the fieldset and still have the CSS code above?

form>input.textfield {
background: transparent
url("image.jpg") no-repeat;
}

Changing "fieldset" to "form" doesn't work. Any ideas?
 
S

Steve Pugh

luke said:
I'm trying to use an image as a background for a text input box.

<form>
<fieldset><input type="text" name ="blah" class="cheese"></fieldset>
</form>

I'm using this code as part of my css to overcome a background repeat bug in
IE 5/6.

fieldset>input.textfield {

Shouldn't that be
fieldset>input.cheese ?
background: transparent
url("image.jpg") no-repeat;
}


This works great. The only problem I have now is that it seems the
<fieldset> tag is causing problems in Opera.

Opera has problems with styles and fieldset. Some work, some don't.
Is there any way I can ditech
the fieldset and still have the CSS code above?

html>body input.textfield {}

Hidden from IE, seen by Opera, Gecko, Safari.

Steve
 
D

Disco Octopus

luke wrote :
I'm trying to use an image as a background for a text input box.

<form>
<fieldset><input type="text" name ="blah" class="cheese"></fieldset>
</form>

I'm using this code as part of my css to overcome a background repeat bug in
IE 5/6.

fieldset>input.textfield {
background: transparent
url("image.jpg") no-repeat;
}


This works great. The only problem I have now is that it seems the
<fieldset> tag is causing problems in Opera. Is there any way I can ditech
the fieldset and still have the CSS code above?

form>input.textfield {
background: transparent
url("image.jpg") no-repeat;
}

Changing "fieldset" to "form" doesn't work. Any ideas?

try this.....
fieldset input.cheese {
instead of this....
fieldset>input.cheese {

ie. use the "descendant of" rather than the "child of" selector.

Does this work for what you want?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top