CSS - Padding In Inputs Being Ignored In Ie
Hi there,
I am trying to add some padding to my inputs, but the padding is being ignored by IE. This is my CSS: PHP Code: INPUT { background-color:#FFFFFF !important; border: 1px solid #ececec; padding: 10px; } Any ideas why it is not working? Similar TutorialsHello, Is there a way to have padding (say 15px) all around a cell, but allow for expections, like having one div element float:left and align far left against cell border while everything else is inset 15px. ie. Code: <style> #menubox { float:left; margin-left:15px; margin-bottom:7px; } .main_cell { padding:15px; } </style> <body> <table width=600 border=0 cellpadding=0 cellspacing=0> <tr> <td valign=top class="main_cell"><div id="menubox">table with menu items taht is achored far left against cell wall</div> Some text that wraps around "menubox" but needs to be padded around cell walls.</td> </tr> </table> </body> Thanks, Rey Hey everyone, I am making a design to kill some time, and I have come across a problem. I have a menu at the top which has no top padding unless I give it padding of 87px. I find this very odd, and it happens in every browser( Firefox 2.0.0.3, Opera 9, IE6-7 ); is it a bug in CSS itself or am I doing something wrong? Here is my code, maybe I am missing something. html4strict Code: Original - html4strict Code <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="Content-Style-Type" content="text/css"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <title></title> <style type="text/css"> body { background-color: #082567; color: #FFFFFF; margin: 0; padding: 0; font-family: verdana,tahoma,"Bitstream Vera Sans",arial,helvetica,sans-serif; font-size: 12px; text-align: justify; } #top-menu { background-image: url( http://secretgeek.net/Gradient.aspx?Direction=H&Length=130&StartColor=082567&EndColor=0C39A1&Format=jpeg ); background-repeat: repeat-x; height: 130px; } #top-menu h1 { float: left; font-weight: bold; letter-spacing: -3px; font-size: 31px; padding: 5px; } #menu { float: right; list-style-type: none; text-align: center; } #menu li { display: inline; } #menu a { background-image: url( http://secretgeek.net/Gradient.aspx?Direction=H&Length=130&StartColor=082567&EndColor=0C39A1&Format=jpeg ); background-repeat: repeat-x; color: #FFFFFF; padding: 50px; } #menu a:hover { background-image: url( http://secretgeek.net/Gradient.aspx?Direction=H&Length=130&StartColor=0C39A1&EndColor=082567&Format=jpeg ); background-repeat: repeat-x; } </style> </head> <body> <div id="top-menu"> <h1>ryon.hunter</h1> <div id="menu"> <ul> <li><a href="">asdf</a></li> <li><a href="">asdf</a></li> <li><a href="">asdf</a></li> <li><a href="">asdf</a></li> <li><a href="">asdf</a></li> </ul> </div> </div> </body> </html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" I validated it and it validates fine, any suggestions? First off, I use Firefox more than IE, so I'm a little upset to see my Firefox version doesn't look as nice as the IE version... When I design, I like to design to make the Firefox one always look better (even though you should make them look the same, sometimes the FF one still looks better than IE... <h3> tags anyone?). So, I have to make these file inputs look better than they do. A couple things I want to focus on (css code below for reference): 1. Make the FF inputs have a width of 450 like they should. 2. Make the FF input buttons have the same border as IE buttons. 3. Remove the bevelled border from FF inputs. First, the screenshots (attached) Second, the inline HTML styles: Code: <tr> <td colspan="4" align="left" style="padding-left: 50px;"> Image 1: <input type="file" name="file[]" style="width: 450px;" /><br /> Image 2: <input type="file" name="file[]" style="width: 450px;" /><br /> Image 3: <input type="file" name="file[]" style="width: 450px;" /><br /> Image 4: <input type="file" name="file[]" style="width: 450px;" /><br /> Image 5: <input type="file" name="file[]" style="width: 450px;" /> </td> </tr> Third, the CSS code: Code: input, textarea, select { border: 1px solid #45649B; } input {-moz-box-sizing: border-box;} Any help is appreciated, Thank You! i tried to search for any threads that talk about this problem, but i wasn't able to find any. i have a css dropdown menu and it works great in firefox(cuz FF rocks). there is an input dropdown under the css dropdown menu, and in IE, the input dropdown shows through the css dropdown layer. i've tried playing with the z-index, but it doesn't seem to work. can anyone help me with this? here is an example of my problem, you'll see the input is showing through the div layer when it shouldn't. Code: <html> <head> <title>Untitled</title> <style> div#layerOne { background-color: #fff000; position:absolute; width:50; top:1em;left:1em; z-index:2;} div#layerTwo { z-index:1; position:absolute; top:2em;left:2em; } </style> </head> <body> <div id="layerOne"> 11 adsf adsf asdf asdfasdf asdfasdf asdf </div> <div id="layerTwo"> <select> <option selected="selected">Choose a topic...</option> <option> DECORATING</option> <option> All Rooms</option> </select> </div> </body> </html> I have a very curious problem with the formatting of input fields in html forms which has me completely stumped. Basically, input fields are not looking as they should (and in particular, not showing any text typed inside them) in any versions of IE (well, 6, 7 and 8 anyway) - tested on various machines so not a Windows installation issue. Despite my setting a class for them I cannot get them to look like proper inputs, nor can I make the inputted text visible. I can see the cursor for the text when I click inside where the input should be, but it looks far too small- about 4 px as far as I can tell. (???) Interestingly in Firefox the text inputted IS visible, although the border of the inputs doesn't show. I've set a class for input: input {border:1px #000; color:#000;} I also tried setting this explicitly for inside the div holding a form where the input appears: .searchform input {border:1px #000; color:#000;} Neither of which work. Here's one of the forms where I'm trying to include the input (hashes at the moment for links as it's in development): <form action="#" method="POST" name="searchform"> <img src="/images/freecallback.gif" alt="Free Call Back"> <a href="#" title="Member Login"><img src="/images/memberlogin.gif" alt="Member Login"></a> <input type="text" name="searchtext" value="" size="8" /> <input type="image" src="/images/searchbutton.gif" name="searchform" /> </form> And here's another form (same result though interestingly the SELECT appears ok): <form action="#" name="bookahotel" method="post"> <label>Arrival</label> <input name="date" size="6" type="text" /> <p class="text_normalblack">Arriving Today</p> <input name="country" size="6" value="Country" type="text" /> <input name="towncity" size="6" value="Town/City" type="text" /> <select name="_EnquiryType" size="1" class="forminputs" /> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> </select> <input name="bookahotel_search" size="6" value="" type="image" src="/images/bookahotel_search.gif" /> </form> Any ideas??? Thanks Can they play nicely together? What I have is a series of check boxes displayed inline with a short label next to each one. Problem is, when there are a lot of check boxes generated and it comes time for a line break, the check box gets broken off from its label. I've tried everything, the label tag, the white-space: nowrap styling. I can't get it to work. So, how do I do this? When a Text Input is disabled, is there a way to control the visual characteristics such that it's not as subdued, or use different colors for the text / background? Has anyone seen hidden inputs being rendered as periods or dots under FF? I am using FF 3.5.4. Is this normal? Thanks Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="content-language" content="en"> <title>Funny Dots</title> <style type="text/css"> input { border:1px solid blue; display:inline-block; } </style> </head> <body> <form action="index.php" method="post" name="mainForm"> <input type="hidden" name="aaa" value="5" /> <input type="hidden" name="bbb" value="" /> <input type="hidden" name="ccc" value="" /> </form> </body> </html> I'm trying to make a simple input form, but the problem is that when trying to use CSS to align things, it makes it seems a lot more difficult. I was trying to get away from using tables because I was told they are unnecessary most of the time for alignment purposes. So if I have a couple of labels and form fields, how can I align them so that the labels all are at around 10px left , and then the inputs start at around 150x left. This is what I started to do, and I was thinking...wouldn't tables be much @$!# easier? I have to specify the position for every form field, and this is just one row: Code: <label style="position:relative; left: 10px; top: 50px; ">Input <u>N</u>ame:</label> <input style="position:relative; left: 100px; top: 50px; " type="text" name="txtInputName" maxlength="40" accesskey="n" > I tried it without the style tags, but the labels and fields would then be right next to each other on each line (no way to horizontally space it out nicely because the label length will vary) Hi guys, Let's say I have 2 inputs: <input ... /> and <input type="submit" ... :> How do I grap the type="submit" input in CSS? For example: input submit {....} I know this does not work... Thank you I am noticing that padding changes the width/height of an object. For example, if I have a div element with a width of 100% and padding at 10px, it will actually cause the horizontal scrollbar on the browser to appear because it takes the 100% width into account, plus 20px for the padding on the left and right side. I thought padding was suppose to push elements inward. ??? Any help will be greatly appriciated. Around this dropdown image? http://199.134.225.62/NW_PORTAL/sliding_menu/sliding_menu.cfm I have padding and margins all set to 0... Right now, there is nothing about padding located in css file. And I was told I should add a bit because my page is a headache to read. I was told: "Basically you want to add more white space between the vertical line and the text" How would I go about doing this? The site Im talking about is: www.ohiocichlids.com Hey everyone, I am working on a new template: http://4xp.net/temp.html The colors are there just so I can see the divs, so don't worry. If you look at the page in IE, it looks fine, with some padding between the green and orange div, and to the right of the orange div. When you look at it in Firefox, there is a bunch of white padding to the top and bottom of both the orange and green divs, and I can't seem to get it to go away. The weird thing is, if I add a 1px border to the orange div, the green div aligns to the top, and the orange background expands to fill in the white area above and below the orange div. Does anyone know how to remove this padding? Thanks! I don't know exactly what to call what's going on, but i'm asuming that there is a padding issue with my menu. I have a ul that contains my menu list. The CSS and xhtml are as follows: Code: /* Menu */ li { border: 1px solid #000000; border-bottom: 0px none; display: inline; line-height: 14px; margin: 0px; margin-left: 1px; margin-right: 1px; padding: 0px; padding-left: 3px; padding-right: 3px; } ul#menu { background-image: url(img/menu.gif); background-repeat: no-repeat; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; list-style-position: inside; list-style-type: none; margin: 0px; padding: 0px; text-align: center; background-position: left bottom; vertical-align: text-bottom; } /* End Menu */ <ul id="menu"><li>Menu 1</li><li>Items 2</li> <li>Will 3</li><li>Go 4</li><li>Here 5</li></ul> (the menu is on one line, thanks to IE's whitespace issue, i broke it here for easier readablity.) the problem is: i have it nestled on top of a div, and for some reason the ul has a 1px bit of padding on the bottom. I have searched the forum and may have missed some one posting a resolution for this, but i tried every one ov the voice-family/carrage return fixes i've seen, but none work. to see what i'm talking about if my words are il formed (as they often are) click here. to view the CSS click here. Hi there, I have 2 main divs.. one which holds a small ammount of content on the right hand side.. like a 'related links' box which is located at the top right of the page. The other div holds the content. It wraps around the top right div, but there is no padding to the right of the content area, so the text goes right the way up to the right hand div. How can I add some padding to the right of this area? I have added padding, but it adds it to the text where it wraps below the top right div. This is the code I am using: PHP Code: #related_links{ width: 165px; height: 237px; background-image: url('images/related_bg.jpg'); background-repeat: no-repeat; float:right; padding-right: 10px; } #related_inside{ padding: 10px; } #content{ padding-right: 10px; } #content_inside{ padding: 10px; } PHP Code: <div id="related_links"><div id="related_inside">right hand text</div></div> <div id="content"> <div id="content_inside" >is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. <strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. <strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </div></div> EDIT: Fixed [s]Anyone know why that ie6 keeps doubling the padding to the left of the that avatar image on the top [/s]http://new.gifdump.com/ Hey everyone, I am working on an old design I started a while back, and for some reason, IE and Opera do not render the top padding right. I figured that it is a bug, but I am not sure. Here is my code: css Code: Original - css Code body { background-image: url( http://img521.imageshack.us/img521/6097/blissxk5.png ); color: #000000; font-family: verdana,tahoma,"Bitstream Vera Sans",arial,helvetica,sans-serif; font-size: 12px; text-align: center; padding: 0; margin: 0; } a img { border: 0; } a,a:link,a:visited,a:hover,a:active { color: #0099FF; text-decoration: underline; } a:hover { color: #FF9900; text-decoration: underline; } #container { width: 85%; margin: 0 auto; text-align: left; } #header { padding-left: 150px; } #menu { width: 100%; text-align: center; } #menu ul { list-style-type: none; display: block; } #menu li { display: inline; } #menu a { padding-left: 45px; padding-right: 45px; padding-top: 15px; padding-bottom: 15px; } #menu a:hover { opacity: .8 !important; background-color: #999999; color: #FFFFFF; } #main { opacity: .6 !important; filter: alpha(opacity=50); background-color: #FFFFFF; padding: 1%; text-align: justify; } #main h1 { color: #0075FF; border-bottom: 2px solid #0099FF; display: block; width: 60%; } #footer { text-align: center; } #footer a { color: #000000; } body { And also IE6+ do not seem to render the filter property. Anyone know whats going on with this? looks perfect in Moz and IE...but any time I set a padding it overhangs the actual width. So the below code creates a 1010px wide result...is there a workaround for Opera sucking? Code: .topa { width: 1000px; padding: 5px; background:#000000 } edit: nesting a div and putting the padding on it without a background seems to work...while I'm sure it is overhanging the same way, at least it doesnt LOOK that way. |