<fieldset> & CSS

Discussion in 'HTML' started by luke, Mar 12, 2005.

  1. luke

    luke Guest

    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?
     
    luke, Mar 12, 2005
    #1
    1. Advertising

  2. luke

    Steve Pugh Guest

    "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 {


    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

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
     
    Steve Pugh, Mar 12, 2005
    #2
    1. Advertising

  3. 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?

    --
    if you pay for your gym memebership, use it
     
    Disco Octopus, Mar 14, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SSBhbSBTYW0=?=

    <fieldset> tag

    =?Utf-8?B?SSBhbSBTYW0=?=, May 24, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    513
    =?Utf-8?B?SSBhbSBTYW0=?=
    May 24, 2005
  2. =?Utf-8?B?a3N0cml5aG9u?=

    Getting Drillthrough result from pivottable fieldset

    =?Utf-8?B?a3N0cml5aG9u?=, Jul 23, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    1,279
    =?Utf-8?B?a3N0cml5aG9u?=
    Jul 25, 2005
  3. RobM
    Replies:
    19
    Views:
    9,487
    brucie
    Nov 16, 2004
  4. Replies:
    7
    Views:
    59,082
    Steve Pugh
    Mar 15, 2006
  5. Peter Smit

    Fieldset not showing

    Peter Smit, Jan 20, 2007, in forum: HTML
    Replies:
    9
    Views:
    4,484
    Peter Smit
    Jan 20, 2007
Loading...

Share This Page