CSS - Fieldset Padding In Ie7
I can't seem to set any padding on the fieldset element with ie7
Has anyone else had these problems and is there a way I can fix this. I even set the fieldset element to a block level element but that didn't work either. example http://section31.us/scripts/testing/xhtml/fieldset.html 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 does fieldset have a width attribute rather than having it spread across the whole screen or should i just put it inside a DIV tag? 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? Hi, I currently have the following layout in a fieldset: [IMG]EDIT: I'll just go ahead and make some spam posts now so I can post an image link[/IMG] Please ignore the language. What I basically want to achieve is making the radio buttons align to the right and the labels to the left. The source for this is like this: html4strict Code: Original - html4strict Code <fieldset> <legend>Beantwoord a.u.b. met helemaal oneens tot helemaal eens</legend> <ol> <li> <label for="q0">Question1</label> <input type="radio" id="q0" name="q0" value="1">1</input> <input type="radio" id="q0" name="q0" value="2">2</input> <input type="radio" id="q0" name="q0" value="3" checked="true">3</input> <input type="radio" id="q0" name="q0" value="4">4</input> <input type="radio" id="q0" name="q0" value="5">5</input> <input type="hidden" name="qid0" value="4" /> </li> <li> <label for="q1">Question2</label> <input type="radio" id="q1" name="q1" value="1">1</input> <input type="radio" id="q1" name="q1" value="2">2</input> <input type="radio" id="q1" name="q1" value="3" checked="true">3</input> <input type="radio" id="q1" name="q1" value="4">4</input> <input type="radio" id="q1" name="q1" value="5">5</input> <input type="hidden" name="qid1" value="6" /> </li> <li> <label for="q2">Question3</label> <input type="radio" id="q2" name="q2" value="1">1</input> <input type="radio" id="q2" name="q2" value="2">2</input> <input type="radio" id="q2" name="q2" value="3" checked="true">3</input> <input type="radio" id="q2" name="q2" value="4">4</input> <input type="radio" id="q2" name="q2" value="5">5</input> <input type="hidden" name="qid2" value="7" /> </li> <li> <label for="q3">Question4</label> <input type="radio" id="q3" name="q3" value="1">1</input> <input type="radio" id="q3" name="q3" value="2">2</input> <input type="radio" id="q3" name="q3" value="3" checked="true">3</input> <input type="radio" id="q3" name="q3" value="4">4</input> <input type="radio" id="q3" name="q3" value="5">5</input> <input type="hidden" name="qid3" value="24" /> </li> <li> <label for="q4">Question5</label> <input type="radio" id="q4" name="q4" value="1">1</input> <input type="radio" id="q4" name="q4" value="2">2</input> <input type="radio" id="q4" name="q4" value="3" checked="true">3</input> <input type="radio" id="q4" name="q4" value="4">4</input> <input type="radio" id="q4" name="q4" value="5">5</input> <input type="hidden" name="qid4" value="40" /> </li> </ol> </fieldset> <fieldset> I already tried making them float but this kinda messed everything up as some questions are multi-line. Is the best way to do this separating the labels and inputs into two floating divs or is there a way that would look cleaner code-wise? Tim The border around the fieldset in IE7 is messed up. The right border is shifted to the left several pixels. It looks fine in IE6. In FF the border isn't shifted but there is less padding on the right side of the fieldset than the left. I can't figure that one out either. If I zero out all the padding & borders the input/textareas push a few pixels out the right side of the fieldset. Looks fine in IE6. So has anyone seen either of these issues and might know how to correct them? Here is the page in question Thanks! Hello All, I am having a bit of a problem with IE and fieldsets. I am not sure what exactly is going on. Take a look at this site in Firefox (I'm currently running version 3.5.2). You will see that it displays correctly. The site also displays correctly in IE8. I am now testing it against IE6/7. I have worked out most of the problems with it, but can not figure out what is causing this issue. The pages to look at are Board Members, Tech News, and Association. The link is: http://209.159.189.187/index.html One further, minor, issue that hopefully is simple involves the UL LI items on the About Us page. I used the reset css file to clear everything, and now whenever the LI item contains text that spans more than a single line, the second level does not indent itself to align with the first line. Like I said, it is a minor thing, but I would appreciate knowing what setting controls that. Thanks everyone. I know everyone who has tried designing emails for Outlook 2007 has had their share of headaches. But I encountered a bug recently where Outlook 2007 is not rendering my fieldset elements correctly. Based on Microsoft's own documents, Outlook 2007 should have full CSS support of the <fieldset> and <legend> elements. Here is my html and css: Code: <fieldset style="border:1px solid #99CCFF; padding-left:10px; padding-right:10px; padding-bottom:10px;"> <legend style="font-weight:bold; text-transform:uppercase;">Warranty Items</legend> ** Content here *** </fieldset> In every other email reader it looks as it should. But in Outlook 2007 there is no border and no padding. Each <legend> element appears as if it were an inline element. Has anyone had any luck with this sort of problem? Thanks! Hi, I am using fieldset to group checkboxes. fieldset { border:none; autoHeight:true; } Several fieldset groups are used inside td (table). In firefox 3.6.17, the layout comes properly. The fieldset automatically adds a line break for every tr-td combination, the layout shows fine. But in IE 8.0.6001, the fieldset does not add a line break for every td/tr. So I have to add an additional blank/empty tr/td to add a line break. Doing so adds 2 lines in FF. How to overcome this problem? What is the ideal css style to be used so that the display comes properly in both IE and FF? Hi Guys, I'm trying to figure out if a certain formatting is available for Fieldsets, specifically, the legend styling. In the fieldset, the legend is typically displayed in the top left corner of the fieldset. I'm wanting to have TWO legends. One in the top left, and one in the top right. Here's two examples. A normal one, and one with two legends that I would like. (i photoshopped the 2nd one). Is this possible? Just wondering if there are any css tags that would be able to produce a fieldset/legend look like this... The idea of being able to get a link to show up on the right side there is what i'm trying for. thanks for reading... Hello, Can I apply a top and bottom border to a fieldset but using an image to define a custom border line? How can I do this? Thank You, Miguel Hey guys, I'm new to the forums and would appreciate any help... I've never used fieldsets before, until now, and check out: http://www.koofers.com/contact.php A horizontal bar shows up in IE... and the globe in the top right of the screen goes off the monitor! And in FireFox, if I add bullet points to the content, the text actually goes outside of the fieldset. I know now the more I read that fieldsets are pretty much just for forms and such, but I really like the cool effect they give! And yes, I know... I shouldn't be using tables for my design, I should be doing crazy sweet things in CSS, but I'm still learning and don't have the time to totally re-design it in CSS (even if I could get it working!) Any help would be appreciated. Hi I'm new to CSS and this site, so please excuse any stupidity in the code and presentation of this query! The following CSS (error.css): Code: body {background-color: white;} title {font-style: italic} thead {font-weight: bold; border-bottom: thick double} td {width: 5em; border-bottom: thin solid black; border-top: thin solid black; background-color: green} table {border: hidden} .Xaddress {border-left: thin solid black; font: 1em bold; color: yellow; text-align: left} .title {border-left: thin solid black; text-align: center; border-bottom: thick double; border-top: hidden} caption {font: 2em bold} #intro {position: static; color: black; height: 20%; backXground: #cccccc;} #addresses { position: relative; left: 5em; height: 60%; color: black; height: 10em;} #table1 {position: absolute; top: 4em; left: 1em; z-index: 10; color: black; background: #cccccc;} #table2 {position: absolute; top: 5em; left: 6em; z-index: 9; color: black; background: #ff00ff;} #footer {position: static; z-index: 10; color: black; height: 20%; backXground: #00ff00;} and xhtml (error.html): Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html> <head> <link rel="stylesheet" type="text/css" href="error.css" /> <script type="text/javascript"> //Bring a span element and descendents to the front and send its span siblings and their descendents to the back function bringToFront(id) { if (id != null) { if (document.getElementById(id)) { //Send all parent's descendents in spans to the back var span=document.getElementById(id).parentNode.getElementsByTagName("SPAN"); var s=0; var c=0; while (span[s]) { setzIndexOfBranch(span[s],9); s++; } //bring id and descendants to the front setzIndexOfBranch(document.getElementById(id),10); } } } //Set the zIndex of a node and all of its descendants function setzIndexOfBranch(node,value) { if (node.style != undefined) { node.style.zIndex = value; } var c=0; while (node.childNodes[c]) { setzIndexOfBranch(node.childNodes[c],value); c++; } } function parseXML() { text="<root>"; text=text+"<heading>XML CSS HTML test</heading>"; text=text+"<table1data>"+"<table>"+ "<caption>"+ "First table"+ "</caption>"+ "<thead>"+ "<td class="title">Column1</td>"+ "</thead>"+ "<tr>"+ "<td>row1</td>"+ "</tr>"+ "<tr>"+ "<td>row2</td>"+ "</tr>"+ "<tr>"+ "<td>row3</td>"+ "</tr>"+ "</table><br/>Some text after table 1<br/>"+ "</table1data>"+ "<table2data>"+"<table>"+ "<caption>"+ "Second table"+ "</caption>"+ "<thead>"+ "<td class="title">Column1</td>"+ "</thead>"+ "<tr>"+ "<td>row1</td>"+ "</tr>"+ "<tr>"+ "<td>row2</td>"+ "</tr>"+ "<tr>"+ "<td>row3</td>"+ "</tr>"+ "<tr>"+ "<td>row4</td>"+ "</tr>"+ "</table><br/>How can I make these 2 tables appear inside the addresses fieldset ?<br/>"+ "<br/>How can I make the addresses fieldset always fill @60% of the height ?<br/>"+ "<br/>Note the size of each table will vary but can assume to be less than 6 rows.<br/>"+ "</table2data>"; text=text+"</root>"; try //Internet Explorer { xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async="false"; xmlDoc.loadXML(text); } catch(e) { try // Firefox, Mozilla, Opera, etc. { parser=new DOMParser(); xmlDoc=parser.parseFromString(text,"text/xml"); } catch(e) { alert(e.message); return; } } document.getElementById("table1").innerHTML= xmlDoc.getElementsByTagName("table1data")[0].childNodes[0].nodeValue; document.getElementById("table2").innerHTML= xmlDoc.getElementsByTagName("table2data")[0].childNodes[0].nodeValue; document.title= xmlDoc.getElementsByTagName("heading")[0].childNodes[0].nodeValue; } </script> </head> <body onload="parseXML()"> <h1>Positioning test script</h1> <span> <fieldset id="intro"> <legend>header</legend> <span id="to"></span><br/> Header text </fieldset> <br/><br/> <fieldset id="addresses"> <legend>addresses</legend> <br>This is in the addresses fieldset</br> <span id="table1" onclick="bringToFront('table1')"></span> <span id="table2" onclick="bringToFront('table2')"></span> <br>This is in the addresses fieldset...................................................................................and I would hope for it to appear beneath the tables above. Table 2 may not exist.</br> </fieldset> <br/><br/> <fieldset id="footer"> <legend>footer</legend> This is all <br/><br/><br/><br/><br/><br/><br/><br/> footer text<br/> <br/>Down to here. </fieldset> </span> </body> </html> produces overflow in the middle fieldset. I would like the tables in this fieldset to be contained by the fieldset. It's prettier. That would also make the footer fieldset visible, so it's essential ! Can anybody help please ? Also the text which should appear below these tables. Any idea why it isn't positioned inline after the tables end ? Thanks. Not the best title, but I couldn't think of a better way to describe what I am trying to do. I currently use css to position form elements and their labels nicely without the use of tables. I now want to be able to add fieldset tags, encapsulating a bunch of radio or checkboxes, and a legend tag, and have that legend tag appear exactly as my current label tags do. Easier to look at the demo page I think: http://markdw.com/formTest.html Looks fantastic in FF, almost perfect in IE, but not so good in Safari (all on a PC). I can fix the positioning of the fieldset in Safari by removing the top:-18px and margin-top:-18px styles, but no matter what I do I cannot get the LEGEND to show up on the page. The same applies to IE6 I just noticed. a) I hope the code is useful and/or interesting to others, and b) I hope someone will be able to help me with the safari issue Many thanks. Greetings, I'm trying to create a fieldset that has rounded corners and a solid border. From what I gather IE displays rounded corners by default, Firefox does not. The code below makes Firefox display rounded corners, but when a border is applied rounded corners won't display on IE. Is there anything I can do to enable rounded borders? Thanks, fieldset { border:3px solid #000000; -moz-border-radius: 8px; border-radius: px; background: #C4FC02; margin: 0 0 1em 0; position: relative; } This looks great in firefox1.5, but not ie6. It actually starts the picture a tad bit above the heading (legend). In firefox, it starts right below the fieldset border, and it's so clean... why not in IE? Any ideas how it could be changed? Code: <fieldset style=" background-image:url(images/d.gif); background-repeat: no-repeat; background-position: top right;"> <legend style="color: #0000CC;">Heading:</legend> ... html code... </fieldset> been tearing my hair out with this problem I've been doing an expanding menu for drupal and functionally it works perfect. You click on the legend, it expands the fieldset. However I'm having major difficulties on the CSS side of things. The problem is that when I adjust the height of the legend to fit the background image, it doesn't push the other fieldsets down in IE 7 and 8 but it does in Firefox and (oddly) IE6. Given that means a ~20 pixel gap between menu items in Firefox compared to none in IE7,8 it means the menu always looks ugly in one of the two sets of browers. Here's the CSS in question (displays ok in IE7,8 but spaced out in FF): Code: fieldset.accordian { border:none; margin-top:8px; padding-bottom:3px; width:205px; } legend { background-image: url('images/menubg.png'); background-repeat: no-repeat; margin:0; padding:0; width:205px; line-height:37px; height:37px; } Hello! I am using some pretty simple css to format a form for my website. I really like the way using Fieldset & Legend allows for quick and easy formatting of the form but I have one small problem. When I give the fieldset a background it goes above the border of the legend and doesn't look right. I've seen forms that have worked around this problem but I'm not sure how. Any suggestions or help would be appreciated! Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <title>ALE Join Form</title> <head> <style type="text/css"> fieldset { border: 2px solid #87AFC7; width: 50%; background: #F5F5F5; } legend { color: #fff; background: #87AFC7; border: 1px solid #fff; padding: 2px 6px } </style> </head> <body> <form action="#" method="post"> <fieldset> <legend>ALE Membership</legend><br><br> <!-- Provide a dropdown menu option field with sauces. --> <input type="hidden" name="on0" value="Type">Type of Sauce <select name="os0"> <option value="Select a type">-- Select a type --</option> <option value="Red">Red sauce</option> <option value="Green">Green sauce</option> </select></p> <br /> <!-- Provide a dropdown menu option field with prices. --> <input type="hidden" name="on1" value="Size">Size <select name="os1"> <option value="06oz">6 oz. bottle - $1.00 USD</option> <option value="12oz">12 oz. bottle - $2.00 USD</option> <option value="36oz">3 12 oz. bottles - $3.00 USD</option> </select></p> <br /> <!-- Display the payment button. --> <input type="submit" name="submit" value="submit" /><br><br> </fieldset> </form><br><br> <fieldset> <legend>Thank You</legend> <center> <p>Your something is complete!</p><br> </center> </fieldset> </body> </html> Below is a link to a terrible picture of the form (sorry it's not online): http://www.leadershipeducators.org/redesign/images/users/Jared/profile.jpg i really like the fieldset due to having the title in the middle of the border, but are there any cross-browser issues? also what i'm finding is that if i set background styling. IE sets the background colour to include the legend aswell, whereas Firefox sets the background colour to the confines of the border. Ideas welcome and asked for Effective Alternatives also welcomed 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. |