Connecting Tech Pros Worldwide Help | Site Map

Input Width

shapper
Guest
 
Posts: n/a
#1: Aug 19 '08
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

Jonathan N. Little
Guest
 
Posts: n/a
#2: Aug 19 '08

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
shapper
Guest
 
Posts: n/a
#3: Aug 19 '08

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
Jukka K. Korpela
Guest
 
Posts: n/a
#4: Aug 20 '08

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 HTML / CSS bytes