CSS - Form Field Borders?
Why do borders not show up on my text field using the following code?
PHP Code: .preRegformField { border-color: #7F9DB9; border-style: solid; border-width: 1; } <input type="text" value="name" size="15" class="preRegformField"> Testing in IE 6.0. All I get is a borderless box with a white bg. Similar TutorialsAt this address my website form and shows differently in IE and Firefox. The questions I have a 1. the border I have coloured but in IE if I do not style it IE produces a nice rounded border but the wron colour. Does anyone know how to get the rounded border corners AND ones own colour? 2. In IE the space between the legend text and the first label text is OK but in Firefox is is greater for some reason. Any clues as to how to make it the same? Hi, in firefox I can do this to highlight a form element when it is selected. input[type="text"]:focus, input[type="password"]:focus, input[type~="text"]:focus, input[type~="password"]:focus, select:focus, textarea:focus { border: 1px solid #9ED175; } Is there a way I can do this in IE ? thanks scott HI Guys, Is there a way to do the following with just css? Code: <script language="javascript"> function ShowContent(d) { document.getElementById(d).style.display = "block"; } function HideContent(d) { document.getElementById(d).style.display = "none"; } </script> // above code in header Code: <fieldset class="radio" style="padding-left: 20px;"> <legend><strong>Postal/Billing Address</strong></legend><br /><br /> <label for="Mixed1"> <input type="radio" name="postal_yn" onclick="HideContent('shaddress');"> Same </label> <label for="Mixed1"> <input type="radio" name="postal_yn" onclick="ShowContent('shaddress');"> Different </label> <div id="shaddress" style="display:none;padding-left: 20px;"> <label for="postal_address"> <br /><span style="line-height:25px;">Please enter your postal address:</span><br /> <textarea type="text" name="postal_address" rows="3" cols="25"><?php if(isset($_POST['postal_address'])) echo $_POST['postal_address'];?> </textarea> </label> </div> </fieldset> Hi guys, I hope I have posted this in the right category? Can anyone advise me on how I could hide this form field using some sort of yes no radio checkbox Postal Address - same / different ** If different is selected the field below is displayed. PHP Code: <label for="postal_address"> Postal Address:<br /> <textarea type="text" name="postal_address" rows="3" cols="25"><?php if(isset($_POST['postal_address'])) echo $_POST['postal_address'];?> </textarea> </label> Any help would be greatly appreciated. I am simply trying to align a form (text field and submit button) to the bottom of its containing div. My method works with text, but not the form... it just stays up at the very top. The CSS: Code: #search { padding: 0 25px 0 0; float: right; } #srchbox { height: 118px; position: relative; } #srchbox .form { bottom: 0; position: absolute; } The HTML: Code: <div id="search"> <div id="srchbox"> <p class="form"> <form> <input type="text"><input type="submit" value="Go"> </form> </p> </div> </div> I know that a form shouldn't be expected to act like text... but I don't know how to go about getting to align at the bottom. Thanks! Below an input text field I want to diplay a div with the same width. Both refer to the same class Code: .fieldWidth{width:250px;} However, once I add the XHTML 1.0 Doctype the input field becomes about 10 pixes wider in IE, Forefox, Opera and Safari (probably in all others too). Is this waht I have to expect when using xhtml (I hate it anyway :-( Thanks for your info 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. Set margin:0px; I'm missing something here. I want to change the color of the default value for this text field, without changing the overall color of the input field. For example, the default value of 170 will be gray, but when a user overwrites the data with their own numerical value, it will be black. I know how to change the color of the input field when a user types in data, but is there a way to change the color of the value= ? <input type="text" name="trans1_1" size="6" value="170"/> Any ideas? Seems like a simple task, but can't figure it out. Thanks in advance for the time. Hi guys, I am using the following css to style a content box: Code: /*---------------- Start of Testimonies Content Box ---------*/ #testimonies { WIDTH: 175px; MARGIN: -85px 0px 0px; POSITION: right; height: 60px; float:right; BORDER-RIGHT: #d9ddb9 1px solid; BORDER-LEFT: #d9ddb9 1px solid; BORDER-BOTTOM: #d9ddb9 1px solid; BORDER-TOP: #d9ddb9 1px solid; PADDING-TOP: 10px; PADDING-RIGHT: 10px; PADDING-BOTTOM: 20px; PADDING-LEFT: 10px; FLOAT: right; BACKGROUND-IMAGE: url(images/bg-down-right.gif); BACKGROUND-POSITION: 50% bottom; BACKGROUND-REPEAT: repeat-x; BACKGROUND-COLOR: #fafceb; } .testimonies-h2 { PADDING-RIGHT: 3px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; BACKGROUND-COLOR: #fafceb } #testimonies H2 { PADDING-RIGHT: 0px; BACKGROUND-POSITION: 2px 3px; PADDING-LEFT: 0px; FONT-WEIGHT: bold; FONT-SIZE: 100%; BACKGROUND-IMAGE: url(images/bg-h2.gif); PADDING-BOTTOM: 2px; TEXT-TRANSFORM: uppercase; COLOR: #8fa300; PADDING-TOP: 2px; BACKGROUND-REPEAT: repeat-x } /*---------------- End of Testimonies Content Box ---------*/ I want to add an inline frame inside the 'testimonies' div in my html but it keeps using the border styling of the css above. I tried using this to cancel it out (placing my inline frame in a span, but it did nothing) Code: #testimonials { border-left:none; border-right: none; border-bottom:none; border-top:none; } HTML CODE: Code: <div id="testimonies"> <h2><span class="testimonies-h2">Testimonials</span></h2> <span class="testimonials"> <!-- ========== V-NewsTicker v2.2 (Freeware) ============= --> <script type="text/javascript" src="v_newsticker_1.js"></script> <!-- ======================= --> </span> </div> Can any one suggest a better CSS script for having a border in IE So far I have the following: PHP Code: border: 1px solid #0099CC; The problem is that when ran in IE, the top border does not show. However it works fine in firefox. Also I get warnings on my script when I run my CSS validation tool. Can any one help. Thge URL is http://pfwd.org.uk/sfd/update_test3.php Hello, I can't for the life of me figure out how to get these thin white borders like on this website: http://www.viceland.com/index_us.php Is this done with a style sheet? I can't find any reference to a border. How is this done? Hi All, I am trying to set a style in my CSS that will show a border-bottom for an entire row. So far I can only get it to work on a per cell (<td>) basis. I am using Dreamweaver MX 2004 and when I select an entire row and assign it a style, it just add's it to the <tr> tags at the top of those rows. Code: <!-- This is a Row that is at the top of the table --> <table width="100%" border="0" class="fullwidth"> <tr> <td class="head">This is a header </td> </tr> </table> <!-- This is where I want the border-bottom attribute to show up --> <table width="100%" border="0" cellpadding="2" cellspacing="1" class="list"> <tr class="list"> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr class="list"> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr class="list"> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr class="list"> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr class="list"> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </table> Here is the CSS: Code: table.fullwidth {width: 100%; background-color: #FFFFFF; border: 0px; border-collapse: collapse; border-spacing: 0px;} tr.list {background-color: #EFEFEF; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; color: #000000; border-bottom: 1px dotted #000000;} Is it possible to have more than one border in CSS? I want to have a grey and green border around an area of text, something like this. So is it possible to have two or more borders in CSS and if so, how? I have this code: Code: <html> <head> <style type="text/css"> body { font-family: arial, helvetica, serif; font-size: 100%; background: white; padding: 2em; margin: 0; } #content { width: 34em; background-color: #ffffff; padding: 1em 0; border: 6px double #6DA9CA; margin: auto; voice-family: "\"}\""; voice-family:inherit; width: 32em; } html>body #content { width: 32em; } a { text-decoration: none; } a:link { color: #080; } a:visited { color: #790; } a:active { color: red; } a:hover { text-decoration: underline; } ul { padding: 0; margin: 0; list-style: none; } li { float: left; position: relative; width: 10em; text-align: left; cursor: default; background-color: white; } li ul { display: none; position: absolute; top: 100%; left: 0; font-weight: normal; padding: 0.5em 0 1em 0; border: solid 1px #6DA9CA; } #submenu li ul { border: solid 1px #6DA9CA; } li>ul { top: auto; left: auto; } #nav a { color: black; } #nav a { text-decoration: none; } #nav li li a { display: block; font-weight: normal; color: #060; padding: 0.2em 10px; } #nav li li a:hover { padding: 0.2em 5px; border: 5px solid #6DA9CA; border-width: 0 5px; } li:hover ul, li.over ul{ display: block; } </style> <script type="text/javascript"> startList = function() { if (document.all&&document.getElementById) { navRoot = document.getElementById("nav"); for (i=0; i<navRoot.childNodes.length; i++) { node = navRoot.childNodes[i]; if (node.nodeName=="LI") { node.onmouseover=function() { this.className+=" over"; } node.onmouseout=function() { this.className=this.className.replace(" over", ""); } } } } } window.onload=startList; </script> </head> <body> <ul id="nav"> <li><a href="">Home</a></li> <li><a href="">Guiding Principles</a></li> <li>Background & Qualifications</a> <ul> <li><a href="">Biography</a></li> <li><a href="">Dispute Resolution</a></li> </ul> </li> <li>Developments <ul> <li><a href="">International</a></li> <li><a href="">Specialty & Agrichemical News & Regulations</a></li> <li><a href="">Archive</a></li> </ul> </li> <li><a href="">Other Resources</a></li> </ul> </body> </html> And I like it - but I have one problem - I want there to be lines between each of the <li>s in the submenus - meaning between Biography and Dispute Resolution I want a line - I know there is no border-middle value - so how do I do this? I have a small table that is not displaying borders in IE. On this page The section with Financial Aid and Parents should have a grey 3px border on the right hand side going from the header image to the person at the bottom. In FF it displays as intended. HTML Code: <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td id="finaid" class="finaid greybrdr"></td> <td id="parents" class="greybrdr"></td> <td id="students" class="students"></td> </tr> <tr> <td class="bod finaid greybrdr"></td> <td class="bod greybrdr"></td> <td class="bod students"></td> </tr> <tr> <td id="finback" class="greybrdr"></td> <td id="parback" class="greybrdr"></td> <td id="studback"></td> CSS Code: .greybrdr { border-right: 3px solid #e4e4e4; } .finaid { border-left: 2px solid white; } .students { border-right: 5px solid white; } .bod { width: 183px; height: 200px; background-color: #FFFFFF; } hi all, hoping someone could help me with an issue i'm having in css involving borders (sort of). hopefully this is the appropriate place for this question, as it does involve some html. i have a page divided into three vertical frames (i know, i know...frames are not ideal. but i would like to keep the page in this format for specific reasons). the border is set to "0" in each frame, but on the left and right frames i use a bit of css code to create a colored border on the right hand side for the left frame, and on the left hand side for the right frame (it creates a kind of vertical outline for the middle frame). hopefully this makes sense. after completely finishing the website and uploading it to my ftp, i found that it works perfectly, except when opened in firefox or navigator. when opened with either of these browsers, the content and most of the design loads fine, but the colored borders in the outer frames are offset from their sides maybe a quarter of an inch. i can't figure out what's causing it, but i know it has something to do with the border code. as i would like this site to be as compatible as possible with most popular browsers, i'd like to try and fix this somehow. i've posted my code following this message in hopes that someone could offer suggestions. any advice would be greatly appreciated. frames created in index.htm: Code: <frameset cols = "25%, 50%, 25%" border = "0"> <frame name = "side1" src = "blankleft.htm" scrolling = "no"> <frame name = "middle" src = "main.htm"> <frame name = "side2" src = "blankright.htm" scrolling = "no"> </frameset> colored border for the left frame (side1): Code: <style type = "text/css"> body { border-left: 0px solid #607046; border-right: 2px solid #607046; border-top: 0px solid #607046; border-bottom: 0px solid #607046; } </style> colored border for the right frame (side2): Code: <style type = "text/css"> body { border-left: 2px solid #607046; border-right: 0px solid #607046; border-top: 0px solid #607046; border-bottom: 0px solid #607046; } </style> i want to tell an iframe to fill 100% width, but have a border of 1px this will cause horizontal scrolling since the width property does not include the border in its calculation. how can i do this? I have a bit of CSS that wraps a border around an image, it works in IE but not in FF. What am I doing wrong? Code: .book_box { width: 95%; padding: 10px 5px 5px 5px; border: 2px solid white; background-color: #eef7ff; text-align : left; overflow: auto; } .book_box_img { float: left; margin: 5px; border: 1px; border-color: #003366; } Hi I am trying to setup a left border on my tabs here, no matter what combination I try I cannot get a left border exactly like the others without giving the wholebox a full border (dont want this!!) Look at the example below.. Code: /* TESTING TABBED BROWSERS*/ } .tabbed-box { width: 100%; background: #fff url(tabbed-body-bg.jpg) repeat-x bottom; /*border: 1px solid #ddd; border-bottom:none; border-left:none; border-right:none;} */} .tabbed-box .tabs li { list-style: none; float: left; } .tabbed-box .tabs li a { display: block; width: 100px; padding: 5px 0; font-weight: bold; text-align: center; text-decoration: none; color: #888; background: #fff url(tabbed-tab-bg.jpg) repeat-x bottom; border-left: 1px solid #ddd; border-bottom: 1px solid #ddd;} .tabbed-box .tabs li:first-child a { border-left: 1px solid #ddd; } .tabbed-box .tabs li a:hover { color: #333; } .tabbed-box .tabs li a:focus { outline: none; } .tabbed-box .tabs li a.active { background: #fff; color: #333; border-bottom: 1px solid #fff; border-left: 1px solid #ddd; margin-left: 5px; } .tabbed-content { padding: 3em 1em 1em 1em; display: none; } Screen Shot Here (not aloud to post URLS) --- >freeimagehosting.net/uploads/4e9d9acdf7.jpg Any help much appreciated!! |