#1
  1. Purple is a Fruit
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    Ireland
    Posts
    404
    Rep Power
    171

    Styling the select element via CSS


    Hey I was styling input elements on a web page of mine as follows:

    input
    {
    background-color: #FFFFFF;
    width: 200px;
    border: 0px black inset;
    font-size: .8em;
    margin-bottom: .0em;
    padding-left: .0em;
    padding-right: 0;
    padding-top: .0em;
    padding-bottom: .0em;
    font-family: Verdana;
    }

    and I wanted to style a drop down menu (select) in a similar fashion, but I cant seem to get rid of the bevelled effect that is default for the drop down menu. I want it to seem like there is no border there at all.

    Also, as an aside, is it possible to get the arrow for the drop down list to disappear when the focus is not on the drop down menu? Would probably be achieved by JavaScript but I am just wondering as it would make the page look a lot nicer if the drop arrow only showed when the menu item is being selected. (Don't worry, it's not going onto a web site, it's just for me

    Thanks for your time.
  2. #2
  3. No Profile Picture
    Senior Citizen
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2001
    Location
    leftcoast
    Posts
    2,019
    Rep Power
    16
    hahahahahahahahahahaha
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2002
    Location
    Seattle WA
    Posts
    863
    Rep Power
    14
    Heh. To clarify adios' response: no.

    You could do something similar with divs and a helluva lot of scripting and an equal amount of patience though.
  6. #4
  7. No Profile Picture
    Senior Citizen
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2001
    Location
    leftcoast
    Posts
    2,019
    Rep Power
    16
  8. #5
  9. Purple is a Fruit
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    Ireland
    Posts
    404
    Rep Power
    171
    Thanks,

    ComboBox is exactly what I need. Just one question, to make this work in a table you have to reference the parent of the object and I'm not sure how to do that. It is automatically set to document.body, but I have it within <table><tr> and <td> tags. Anyone able to help me with this?

    Thanks a lot.
    Last edited by Ebow; November 27th, 2002 at 05:39 AM.

IMN logo majestic logo threadwatch logo seochat tools logo