Connecting Tech Pros Worldwide Help | Site Map

Input Width

  #1  
Old August 19th, 2008, 04:25 PM
shapper
Guest
 
Posts: n/a
Hello,

I defined the width of a form input as follows:

fieldset input {width: 24em;}

But then the checkbox inputs also get a width. So I uses the
following:

<input name="IsPublished" id="IsPublished" type="checkbox"
class="test" value="Yes" />Check to publish

fieldset input.test {width: auto;}

But I wasn't able to reset the width. Any idea why? I also tried with:

fieldset input.test {width: 10px;}

It didn't work either.

Thanks,
Miguel

  #2  
Old August 19th, 2008, 06:15 PM
Jonathan N. Little
Guest
 
Posts: n/a

re: Input Width


shapper wrote:
Quote:
Hello,
>
I defined the width of a form input as follows:
>
fieldset input {width: 24em;}
>
But then the checkbox inputs also get a width. So I uses the
following:
>
<input name="IsPublished" id="IsPublished" type="checkbox"
class="test" value="Yes" />Check to publish
>
fieldset input.test {width: auto;}
>
But I wasn't able to reset the width. Any idea why? I also tried with:
>
fieldset input.test {width: 10px;}
>
It didn't work either.
Is what you are wanting

input[type="text"] { width: 24em; }

?



--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
  #3  
Old August 19th, 2008, 06:45 PM
shapper
Guest
 
Posts: n/a

re: Input Width


On Aug 19, 6:08*pm, "Jonathan N. Little" <lws4...@central.netwrote:
Quote:
shapper wrote:
Quote:
Hello,
>
Quote:
I defined the width of a form input as follows:
>
Quote:
fieldset input {width: 24em;}
>
Quote:
But then the checkbox inputs also get a width. So I uses the
following:
>
Quote:
<input name="IsPublished" id="IsPublished" type="checkbox"
class="test" value="Yes" />Check to publish
>
Quote:
fieldset input.test {width: auto;}
>
Quote:
But I wasn't able to reset the width. Any idea why? I also tried with:
>
Quote:
fieldset input.test {width: 10px;}
>
Quote:
It didn't work either.
>
Is what you are wanting
>
input[type="text"] { width: 24em; }
>
?
>
--
Take care,
>
Jonathan
-------------------
LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com
Wow, it worked fine ... didn't know that ... but is there ok for all
browsers?

Thanks,
Miguel
  #4  
Old August 20th, 2008, 07:08 PM
Jukka K. Korpela
Guest
 
Posts: n/a

re: Input Width


shapper wrote:
Quote:
I defined the width of a form input as follows:
>
fieldset input {width: 24em;}
OK.
Quote:
But then the checkbox inputs also get a width.
Indeed.
Quote:
So I uses the following:
>
<input name="IsPublished" id="IsPublished" type="checkbox"
class="test" value="Yes" />Check to publish
>
fieldset input.test {width: auto;}
Fine. It's more primitive than using input[type="checkbox"] but works much
more often (namely on IE 4, IE 5, IE 6, and IE 7 in quirks mode as well as
on better browsers).
Quote:
But I wasn't able to reset the width. Any idea why?
You didn't quite do what you wrote here. A URL would have made it possible
to tell what you did wrong.

P.S. In future when replying, don't quote everything, just the relevant
part. On Usenet, fullquoting indicates lack of comprehensive reading.

--
Yucca

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Input Width shapper answers 0 August 19th, 2008 06:55 PM
Re: Input Width shapper answers 0 August 19th, 2008 06:45 PM
How is DocType related to text input width? kolik answers 2 March 6th, 2008 04:34 PM
Table with input width 100% Robert answers 3 August 31st, 2005 08:45 AM