473,394 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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

Aug 19 '08 #1
3 4244
shapper wrote:
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
Aug 19 '08 #2
On Aug 19, 6:08*pm, "Jonathan N. Little" <lws4...@central.netwrote:
shapper wrote:
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 STUDIOhttp://www.LittleWorksStudio.com
Wow, it worked fine ... didn't know that ... but is there ok for all
browsers?

Thanks,
Miguel
Aug 19 '08 #3
shapper wrote:
I defined the width of a form input as follows:

fieldset input {width: 24em;}
OK.
But then the checkbox inputs also get a width.
Indeed.
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).
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

Aug 20 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: J_axx | last post by:
Wow I was told this is a grate place for info I did not believe um but I was wrong I have 4 ASP pages on my site & a DB for each page has a form pointing at its DB, I thought this would be the...
3
by: KathyB | last post by:
Hi, I'm trying to find a way to validate input text boxes where I don't know the names until the page is rendered. I've got 2 validate functions that fire with the onsubmit button of a "mini" form...
2
by: Susan G. Conger | last post by:
When I run the following HTML in IE, the First Name, Last Name and Email fields are colored and are 3d controls while the other fields are not. I don't know why this is. Can someone please tell...
2
by: Kai Grossjohann | last post by:
I would like to put a text input field (in the sense of <input type="text">) and an image next to each other, where I know the size in pixels of the image, and I know the total width in em. I...
4
by: j.t.w | last post by:
Hi All. I'm having a problem with my Date of Birth textbox. When I open the ..htm file, the "DoB" textbox is flat with a border. All of my other textboxes are sunken and are yellow. When I...
8
by: BiNZGi | last post by:
Hi I have reduced the problem to this code: <form> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td><input type="text" style="width: 100%;" value="Lorem ipsum dolor...
1
by: S. David Kyle | last post by:
I am having a weird issue when I generate an input Html tag from a Xsl transformation. When the trasform is executed on the xsl below, the <inputtag has the closing slash removed in the first...
3
by: cbradio | last post by:
Hi, I am having trouble developing a form in a restricted environment. My sample code is found below my message (sorry I don't have a URL). Basically, without a doctype, the form displays properly...
10
omerbutt
by: omerbutt | last post by:
hi there i am working on an inventory rpoject and for that i have made a stock entry form which is pasted below,I have included this form in the main Add Stock page, having the following inputs to be...
5
by: The Devil | last post by:
Hi, This is not just a simple input form made with javascript. This is the code: <html><head> <script language="JavaScript"> var i=0; function add(inputEvent, inputDur, inputCode,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.