SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist
    Join Date
    Feb 2005
    Location
    London, UK
    Posts
    422
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    border to drop down

    select.dropdown {margin-left:27px; margin-top:3px; margin-bottom:5px; background-color: #ffffff;}

    this is my css for my drop down.. ive tried adding border-color and so on but i cant seem to get a border displayin on IE and ff.. how do you do it

  2. #2
    SitePoint Guru babyboy808's Avatar
    Join Date
    Nov 2004
    Location
    dublin
    Posts
    602
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    border: 1px solid red;

  3. #3
    SitePoint Evangelist
    Join Date
    Feb 2005
    Location
    London, UK
    Posts
    422
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that doesnt work

  4. #4
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It works in Opera and in Firefox, although CSS explicitly says that it is undefined how CSS works with form controls.

    In any case, a workaround for IE is to use a span (that "has layout") around the select box and specify a border on that, then use a negative margin on the select itself to get rid of its border.
    Code:
    * html span { border:1px solid lime; zoom:1; }
    * html select { margin:-2px; }
    select { border:1px solid lime; }
    HTML Code:
    <span>
     <select>
      <option>foo</option>
     </select>
    </span>
    Simon Pieters


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •