Connecting Tech Pros Worldwide Help | Site Map

Input Width

 
LinkBack Thread Tools Search this Thread
  #1  
Old August 19th, 2008, 03:25 PM
shapper
Guest
 
Posts: n/a
Default Input Width

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, 05:15 PM
Jonathan N. Little
Guest
 
Posts: n/a
Default 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, 05:45 PM
shapper
Guest
 
Posts: n/a
Default 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, 06:08 PM
Jukka K. Korpela
Guest
 
Posts: n/a
Default 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

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.