CSS - Customizing Input Field With Css - Explorer Don't Work
Similar TutorialsHi there! I'll cut right down to the chase: is my method of styling form input fields efficient? Is there a better way to do it? I tried directly styling the input, rather than putting it in a div, but it didn't work in IE (when too much text went into the field, the background would move, no matter what I did. ) Also, is my <label> styling okay? HTML Code: Original - HTML Code <div class="formRow"> <div class="textInput"> <input class="textInput" id="name" type="text" /> <label for="name">Name</label> </div> </div> <div class="formRow"> <div class="textInput"> <input class="textInput" id="name" type="text" /> <label for="name">Name</label> </div> </div> CSS Code: Original - CSS Code #content div.formRow:hover { background-color: #EEE; } #content input.textInput { font-size: 14px; color: #666; padding: 3px 5px; width: 190px; height: 20px; border: 0; background-color: transparent; } #content input.textInput:focus { color: #000; } #content div.textInput { margin-left: 50px; background: transparent url('images/textInput.png') no-repeat; } #content div.textInput label { font-size: 14pt; font-weight: bold; margin-left: 50px; vertical-align: top; }
And lastly... my image: Thanks a lot! CAn anyone tell my why in firefox this code showes borders on all sides but in ie it only shows left and right borders? Code: <style type="text/css"> a:link { text-decoration:none; color:#000000; background:white; font-weight : bold; display:inline; border-color:#000000; border-style:solid; border-width:1px; padding-left:3px; padding-right:3px; padding-top:3px; padding-bottom:3px; } a:active { text-decoration:none; color:FFFFFF; background:background-color:#FFFFFF; font-weight:bold; display:inline; border-color:#FFFF00; border-style:solid; border-width:1px; padding-left:3px; padding-right:3px; padding-top:3px; padding-bottom:3px; } a:visited { text-decoration:none; color:#0000FF; font-weight:bold; display:inline; border-color:#000000; border-style:solid; border-width:1px; padding-left:3px; padding-right:3px; padding-top:3px; padding-bottom:3px; } a:hover { text-decoration:none; color:FFFFFF; font-weight:bold; background:background-color:#FFFFFF; display:inline; border-color:#FFFF00; border-style:solid; border-width:1px; padding-left:3px; padding-right:3px; padding-top:3px; padding-bottom:3px; } .navigationBorder { width:600px; } </style> <div class="navigationBorder"> <a href="http://www.2dwebdesign.com/index.html">Home</a> <a href="http://www.2dwebdesign.com/design.html/">Design</a> <a href="http://www.2dwebdesign.com/build.html/">Build</a> <a href="http://www.2dwebdesign.com/publish.html/">Publish</a> <a href="http://www.2dwebdesign.com/promote.html/">Promote</a> </div> input fields in tabs not appearing in IE7 though it works fine with IE8 and Firefox3 http://www.refinethetaste.com/html/cp/default.asp?Section=orders&Process=AddOrder I'm trying to align a div right after an input text field. div has a background image I want to display, but no text. div is going on the next line after input. how can I keep it to the left of the input text field? Thanks I am using the following code to create a custom input field: Code: input[type=text]:focus, input[type=password]:focus, textarea:focus, select:focus { outline: 0 none; } This essentially removes the border from the input field however this does not work in Safari on a Mac (works fine in Safari on Windows). Any one know how to fix this? I have a disabled input field that is managed by PHP scripts. I need the fields to appear to the user but to look like just text. The main problem is that I have a patterned background on the page and I don't know how to create the style so that there is a transparent background on the input field. Can someone help? TIA. Hi I am currently having problems changing the size (or width) of INPUT fields within a form when they have a class assigned to them. If I remove the class that is assigned then the size attribute works fine. Do I need to specify the size of the INPUT field within the CSS file that holds the class? And if so how do I do it? Thanks in advance for any help. Ok, i have this side div thats small. I want to be able to mouse-over (hover) over it or if not that click it. When either action is done, than it will reveal a input field attached to that small tab that was hovered, or clicked. If you need more details or explanation than reply, I cant really explain it but i will try. How do you get the input text areas and selections to highlight or glow once active? For examples, visit Zappos.com or Amazon.com - when you click in the text fields to login it sort of glows. Hi, I've searched the forums and seen where others had a similar problem, but the suggested solution has not worked for me. What I'm doing: using div tags to create the appearance of a 4 column form. For some reason, after I use the tag <div id='2col_right'> Form fields contained in my next div tag (<div id='2col_left'>) are un editable. If I use my tab key, I can get to them in tab mode. And if they already contain data they can be edited, but the blank fields (see Trustee) will not allow me to click into. My code snippet, with the style sheet included, looks like this: Please see my code snippet: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Test Page</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> #pagecontainer {position: relative; top: 0pt; right: 0pt; margin: 0pt;} #maincontent {position: relative; clear: both; margin: 0pt;} #2col_left {margin: 0pt 10pt 10pt 4pt; float: left; padding: 4pt; clear: left;} #2col_right {margin: 0pt 10pt 10pt 4pt; padding: 4pt; clear: right;} .formcouple {margin: 0pt 5pt 5pt 5pt; font-size: 8pt;} .formlabel {width: 100pt; border: 1pt solid #003366; font-weight: bold; font-size: 8pt; padding: 2pt; margin: 0pt 0pt 6pt 0pt; background: #ECF5FD} .formvalue {border: 0pt solid black; font-weight: normal; font-size: 10pt; padding: 2pt; margin: 0pt 0pt 6pt 0pt;} </style> </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0" bottommargin="0" margin="0"> <div id="pagecontainer"> <div id="maincontent"> <form name="fCustForm" action="default.cfm?fuseaction=custCreate" method="post"> <div id="2col_left"> <span class="formcouple"> <span class="formlabel">Customer Name</span> <input type="text" name="name" value="john doe" size="30" maxlength="60"> </span> </div> <div id="2col_right"> <span class="formcouple"> <span class="formlabel">Address</span> <input type="text" name="address" value="126 Some Rd " size="30" maxlength="255"> </span> </div> <div id="2col_left"> <span class="formcouple"> <span class="formlabel">Trustee</span> <input type="text" name="trustee" value="" size="20" maxlength="25"> </span> <br> <span class="formcouple"> <span class="formlabel">City2</span> <input type="text" name="city2" value="" size="30" maxlength="30"> </span> <br> </div> </div> </div> </body> </html> BTW - I am doing this in IE6.x I have made this input field so people can place their name in there but noticed that when you type into it, the writing begins too close to the left side and I would like to place like a left margin on it by about 5px. This is my input field code on my form: Code: <input type="text" class="field" name="title" size="45" maxlength="200"/> On my stylesheets I placed this: Code: input.field {background-color:#333333; border:none; margin-left:5px; font-family: Arial, Helvetica, sans-serif; font-weight: none; font-size: 11px; color: #000000;} Doesn't work?? I can't figure out why. I have customized the elements of a form for a website I am working on. I have set the input fields to have a white background, however, in three out of the six textfields the background is yellow (this only happens in Internet Explorer 6). I have checked the CSS, and the yellow isn't included anywhere. If anybody can help I would be grateful. Thanks. I'm going round and round without getting any head way so hopefully someone can give me a hand... I'm creating a mail form using a background image for the input fields. What I don't want is a border. If I don't add a border: solid black, for instance, I get a default white. Is there a way to have no border? Code: INPUT.email { background-image: url(images/bg_email.jpg); width:206px; height:21px; font-family: Verdana, sans-serif; font-size: 14px; color: #ffffff; border: 1px solid black; margin: 0 0 0 10px; padding: 0 0 0 6px; } Thanks in advance! Hi all, Im having a great deal of problem trying to get a CSS based autocomplete menu appear above input fields (not select) in IE 7 only. Have tested in Firefox, Safari, Opera etec and it looks good. Am totally stumped on this so any help much appreciated, kind regards matt Usually I find anything I need to know if I have the source code of a web site but this time I've lost. Some web sites changes the background color of the browsers address (URL) input field (works only with Gecko type browers I think). Just one example: https://www.gmx.net (a commercial email service provider in Germany). How can this be done? Ciao, Meph Hello, Can someone please tell me what I am doing wrong here. I am trying to alter the background of an input using css. It seems to work in IE but not in fierfox. Below is the sample code. Thanks. Code: <head> <style type="text/css"> .container{ width: 610px; height: 300px; border:solid 3px #59813a; } #format1 input{ background-color: purple; width:75px; } </style> </head> <body> <div class="container"> <form id="form" name="form" method="post" action="index.html"> <table> <tr> <td >Last Name</td> <td ><input type="text" name="name" value="enter name" class="size1" /></td> <td>name</td> <td><div id="format1"><input type="text" name="name" id="name" /></div></td> </tr> </table> </form> </div> <!-- container --> Hi, can anyone give me a hand with customizing my lists? I am trying to do something like here, http://www.microsoft.com/, but with a semi-transparent background in the nav bar. It works if I have borders around the links, which is fine if I had a solid bg as I can hide them, but being semi-transparent I have a problem, and when I remove them it causes a shift when moving over a link. Any ideas?? I am trying to customize some links. However, everything I've found shows how to customize all the links (using a:active, etc.). I cannot find the syntax to create a style that I can apply to specific links. Can someone help? TIA. |