Input style works in Firefox, but not IE

Discussion in 'HTML & Website Design' started by ian_batten, Mar 31, 2010.

  1. #1
    Hi guys,

    I'm having some problems with my input styling.

    I've got the following:

      <select id="permission_select" onChange="update();" style="border: 4px solid #000000; width: 300px; padding: 6px; font-weight: bold; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin: 0px;">
                <option value="0">xBox live 1 month 
                <option value="1" SELECTED>xBox live 12 months
                <option value="2">1200 Microsoft points
                <option value="3"> 4200 Microsoft points 
              </select>
    HTML:
    The styling works fine in firefox (the border, padding, etc), however in ie, the only thing that styles in the text.

    Any ideas what's happening?

    Thanks in advance.
     
    ian_batten, Mar 31, 2010 IP
  2. nimonogi

    nimonogi Active Member

    Messages:
    398
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    80
    #2
    FF and IE handles html forms in a different way.

    Try this way:

    Add the style code between <head>...</head>
    
    <style type="text/css">
    .selectstyle {border: 4px solid #000000; width: 300px; padding: 6px; font-weight: bold; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin: 0px;}
    </style>
    
    Code (markup):
    and change the form as below to make use of the style:
    
    <select id="permission_select" onChange="update();" class="selectstyle">
                <option value="0">xBox live 1 month
                <option value="1" SELECTED>xBox live 12 months
                <option value="2">1200 Microsoft points
                <option value="3"> 4200 Microsoft points
              </select>
    
    Code (markup):
    Good luck.
     
    nimonogi, Mar 31, 2010 IP
  3. ian_batten

    ian_batten Well-Known Member

    Messages:
    1,991
    Likes Received:
    106
    Best Answers:
    0
    Trophy Points:
    185
    #3
    Thanks for your suggestion, but unfortunately that hasn't made a difference.
     
    ian_batten, Mar 31, 2010 IP
  4. zonexx

    zonexx Peon

    Messages:
    80
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    For me I wouldn't bother about IE users coz whosoever uses IE, hardly knows about internet. Anything you display to them would look just fine
     
    zonexx, Mar 31, 2010 IP
  5. canadianguy_001

    canadianguy_001 Peon

    Messages:
    97
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    In case you're interested, I wrote a jQuery plugin to style forms however you like - regardless of browser restrictions.

    This may or may not meet your needs, but I thought I'd pimp it anyway

    Take a look:
    http://adamcoulombe.info/lab/jquery/select-box/
     
    canadianguy_001, Apr 1, 2010 IP
    ian_batten likes this.
  6. ian_batten

    ian_batten Well-Known Member

    Messages:
    1,991
    Likes Received:
    106
    Best Answers:
    0
    Trophy Points:
    185
    #6
    Looks brilliant canadianguy, never thought about using JQ for styling.

    Thanks for the share!
     
    ian_batten, Apr 3, 2010 IP