473,414 Members | 1,848 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,414 software developers and data experts.

Styling input tags

219 100+
I'd like to add a border to my input items on my forms, but I don't want the style to be used on checkboxes, and radio buttons because the style has a border in it. Is there an easy way to do this?

I have a style setup like this:

Expand|Select|Wrap|Line Numbers
  1. input,textarea{
  2.     border:1px solid #666;
  3. }
  4.  
Is it possible to style the actual input types? I really just want to style the text boxes and the input buttons.
Dec 12 '07 #1
6 1876
drhowarddrfine
7,435 Expert 4TB
Did you try what you show? That should do it.
Dec 12 '07 #2
dmorand
219 100+
What I show for css styles all of my inputs, but that includes the checkboxes and radio buttons. I don't want those to have the style associated to them, so I was hoping I can style input types rather than the input tag itself.
Dec 12 '07 #3
drhowarddrfine
7,435 Expert 4TB
That's interesting. I didn't know IE did that.

Just add an 'id' to the <input>s you want styled.
Dec 12 '07 #4
Markus
6,050 Expert 4TB
Expand|Select|Wrap|Line Numbers
  1. input[type=text]{
  2.     border: 4px black solid;
  3. }
  4.  
Just change the type around.

And as you've guessed, this does not work in IE. Or more fittingly, IE SHOULD DIE!!!!!
Dec 12 '07 #5
dmorand
219 100+
Yeah thats pretty much what I came up with myself. .... I hate IE.

Firefox works fine and doesn't put the border around the checkbox or radio, but stupid IE does. Geez I hate IE
Dec 12 '07 #6
drhowarddrfine
7,435 Expert 4TB
Google Trends shows a slow but steady decline in IE usage while FF, Opera and Safari show slow but steady increases. Microsoft has already stated IE8 will not have the improvements to their browser that everyone wants them to have. So, once again, Microsoft thumbs their nose at the developer.
Dec 12 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Eduard Dewolf | last post by:
Hi, Im have been changing my site to make it HTML 4.01 compliant As I should, I wrapped all INPUT tags in blocks I wrapped the not visible INPUT type HIDDEN tags in first PRE, later H6 tags...
3
by: Garmt de Vries | last post by:
On the website of the Dutch Jules Verne Society (www.jules-verne.nl), we have several forms that visitors can use to order something, or to apply for membership. Of course, a form's primary purpose...
3
by: gruntledlark | last post by:
i'm trying to create a style sheet for an existing web application. I have pages that the app generates that gives me input fields inside of table cells. like this: <td><input></td> my...
1
by: vega80 | last post by:
Hi. I have a problem with assigning an onkeypress-function to dynamically created input-boxes.I want to put the content of an input-field into a tag-list when the user hits enter. This works...
2
by: vkfmj | last post by:
I am bidding on a project that was coded completely in php with basic tables containing the data. My job is to make the site look pretty. I am a designer and I can *read* the php, but am not the...
3
by: Momomo | last post by:
Hi, I am having a problem with a control which is caused by a style on the page which I am not able to trace. If I use the control in a page without any styling it looks ok. Is there a way to...
40
by: Jukka K. Korpela | last post by:
My basic style sheet has a distinctive background and border for forms, to make the structure clearer and to make it visually evident what belongs to a form. However, as people complained that...
3
by: shapper | last post by:
Hello, I am creating a simple navigation bar using a list. My anchor tags inside each list item have a background and margin. The problem is they are overlapping. I then added to the li tag...
2
by: shapper | last post by:
Hello, I am styling the labels on a section of my page as follows: label {float: left; width: 6.5em;} Now I want to remove this styling from a label that has the class "Message". Mu...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.