A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Forms in firefox?

  1. #1
    Wait- what now? tidenburg's Avatar
    Join Date
    Dec 2005
    Posts
    1,471

    Forms in firefox?

    Is there any way to resize forms in firefox using css, it doesnt seem to work for me.
    "I'd only told them the truth. Was that so selfish? Our integrity sells for so little, but it is all we really have. It is the very last inch of us, but within that inch, we are free."

  2. #2
    Senior Member
    Join Date
    Jan 2005
    Posts
    1,582
    You can control size using css. Can you show us what you're using?

  3. #3
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    Sure, you could set the dimensions of all your input fields using,

    Code:
    input {
      width: 200px; height: 25px;
    }
    however this would set the dimensions of all input fields, text, password, checkboxes etc... which isn't ideal. if you don't care about IE 6 and older you can use attribute selectors to specify different types of input fields,

    Code:
    input[type="text"] {
      width: 200px; height: 25px;
    }
    input[type="checkbox"] {
      width: 15px; height: 15px;
    }
    This should be supported in IE 7, Opera, Mozilla, Safari etc...

    On the other hand (and most likely) if you do need to cater for IE 6 and older, you can add a class attribute to your input fields and then use the class selector in your CSS to control which styles are applied to which input fields,

    Code:
    input.txt {
      width: 200px; height: 25px;
    }
    input.cb {
      width: 15px; height: 15px;
    }
    where cb is a class for all the fields you want to make 15px by 15px and txt is a class on the fields you want to make 200px by 25px

    <input type="text" class="txt" value="Hello">

    <input type="checkbox" class="cb" value="1">

    textareas are treated separately to the other input fields, they just need something like,

    Code:
    textarea {
       width: 400px; height: 300px;
    }

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center