CSS - Text Border Works In Ff But Not Ie
For some reason the bottom border on my text in SPAN.standard_field_type_info works fine in firefox but on IE7 (I don't have IE6 anymore to test) it is not shown. I am pretty sure it is a margin/padding thing hiding the border but I can't remember how to fix it.
Anyone got the rather simple solution? Cheers. PHP Code: DIV.standard_field_container { width: 98%; padding: 0.4em; border: 1px solid #8B8B8B; background-color: #E2E2E2; overflow: hidden; } DIV.standard_field_left { width: 10em; float: left; margin-right: 1.5em; font: bold 0.8em Verdana, Arial, Helvetica, sans-serif; } DIV.standard_field_right { font: normal 0.8em Verdana, Arial, Helvetica, sans-serif; } SPAN.standard_field_type_info { font-weight: normal; color: #ff0000; border-bottom: 1px dashed #ff0000; cursor: help; } Similar TutorialsHere's the code (it's all in the one file). (I had a link but I'm too new here) 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" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/xhtml; charset=ISO-8859-1"></meta> <title> image border bug test</title> </head> <body onload="highlightimg()"> <div id="container"> <a class="aclass" ><img src="a.jpg" id="i1" alt="alttext"/></a> <a class="aclass" ><img src="b.jpg" id="i2" alt="alttext"/></a> <a class="aclass" ><img src="c.jpg" id="i3" alt="alttext"/></a> </div> <script type="text/javascript"> function highlightimg(){ document.getElementById('i2').setAttribute('style','border-width: 3px 3px 3px 3px; border-color:red;border-style: solid;'); } </script> </body> </html> Internet explorer refuses to apply the border style to the center (or either of the other) images. Any thoughts? (This is a small test case, the style must be applied with js in the actual application I'm building). Hi all, I've tried both the "shorthand" and regular version of BORDER attribute, and neither works, Yet outline works fine (but I don't want to use that since IE7 doesn't support it). Anyone able to troubleshoot this? Here's part of the CSS code (the ".thumb" class at the end is what's not working) and below that is the url. CSS Code: Original - CSS Code .gallerycontainer{ position: relative; text-align:right; margin-left: 0em auto; margin-right: 0em auto; /*Add a height attribute and set to largest image's height to prevent overlaying*/ } #thumbBox{ /*Outermost DIV for thumbnail viewer*/ position: absolute; left: 2.5em; top: -4em; width: auto; height: auto; padding: .5em; padding-bottom: 0em; background: #313131; visibility: hidden; z-index: 5; cursor: hand; cursor: pointer; } #thumbBox .footerbar{ /*Footer DIV of thumbbox that contains "close" link */ font: bold 1em arial; line-height: 1.1em; color: white; padding: .5em 0; text-align: right; } #thumbBox #thumbImage{ /*DIV within thumbbox that holds the enlarged image */ background-color: #CCC; } #thumbLoading{ /*DIV for showing "loading" status while thumbbox is being generated*/ position: absolute; visibility: hidden; border: .125em solid black; background-color: #EFEFEF; padding: .5em; z-index: 6; } .thumb { margin: .5em .5em .5em .5em; height: 8.5em; width: 8.5em; border-style: dashed; border-color:#CCC; border-width:.125em; } .gallerycontainer{ I don't think I have the 5 requisite posts, so here's the url in question (# = .) & (| = /) http:||www#bauerbuiltmfg#com|db-series-planters#html Thanks in advance for any help! Here's the css code. Code: .toolbar a:hover, .toolbar a:focus, .toolbar a:active { background-color:#F5F9FA; } .toolbar { border:0; padding:0; margin:auto; border-collapse:collapse; } .toolbar a { display:block; text-align:center; vertical-align:middle; white-space:nowrap; } .toolbar a:hover, .toolbar a:focus, .toolbar a:active { text-decoration:none; } It works fine when you hover over a link, it lights up the back of the td which is what I want. However I would like the whole td to act as a link. So wherever you move the mouse over the td it lights up and would link to the page, instead of just over the text. Any suggestions? Hello, I'm using css to display a list using a unordered list. I want to put a border around the whole thing and I want to have some text that sits on top of the border (and indented a little). Can someone tell me how I could do this without making a specific absolute position style to do it? This is a mockup of what I'm trying to do - Where you see "i want text here" is where I want to put text: This is the css I have for the box so far: Code: #main_content ul.cfcheader { border-style:solid; border-width:12px; border-color:#d9e7f2; } #main_content ul.cfcheader li { position: relative; list-style: none; width: 548px; padding-left: 48px; text-align: left; margin-bottom: 20px; } I'm a wicked css noob so any help you could give would be helpful!1 TIA! I'm a noob when it comes to CSS, so please go easy on me . I want to display a border to enclose text - like this: Code: <h4 style="border: solid">Some text</h4> The result, however, is that the border ends up extending to the end of the line enclosing a bunch of whitespace after the text. If I enclose the text in a table I get the result I want, but that's a very verbose solution. Is there a way to do it with just CSS? Thanks, David Hi, I am having a strange issue with my new site code . I am experimenting with a new look and decided to go with all css, no tables look. I have a div where the enteries go. I entered some random text to see how it looks. To my surprise in Mozilla 1.7.10 the text overflows from the entry div into the other one while it works fine in Internet Explorer ( the post box expands automatically to fit all the text). Second the in the commentsarea div, why is the "comments(1) floating in the middle of the entry box instead of the bottm right ? here is the code in question 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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="author" content="Kashif Khan" /> <style type = "text/css" media="screen"> body { background-color:#A2C257; color: #333; padding:0; margin:0; font: 90% Verdana, Times New Roman, Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif; } #page { text-align: left; margin: 20px auto; padding: 0px; width: 800px; background-color:#A2C257; } #header { height:105px; margin-bottom: -1px; background: url("url13.jpg") no-repeat top center; } .entry { border: 1px solid #FF4500; background-color:white; height:200px; margin:15px 0px; padding: 15px 20px 20px 20px; } #menuarea { padding:0px; margin:0px; font:90% Verdana, Times New Roman, Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif; text-align:center; } #menuarea #navbar { text-align:center; padding-bottom:5px; padding-top:5px; padding-left:0px; margin-top:0px; margin-left:0px; background-color:#white; color:white; line-height: 18px; margin: auto; width:100%; } #navbar { font:80% Verdana, Times New Roman, Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif; text-align:right; margin: 0px 0px; } #navbar a { color:white; } #navbar li { display:inline; padding: 5px 0px 5px 0px; } #navbar li a { padding: 5px 10px 5px 10px; color: white; text-decoration:none; border-right: 1px solid #fff; } .center { text-align:center; } p img { padding: 0; max-width: 100%; } a { text-decoration:none; } a:hover { text-decoration:underline; } a img { border:none; } .commentsarea { font:80% Verdana, Times New Roman, Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif; text-align:right; margin:0px 0px ; } </style> </head> <body> <div id = "page"> <div id = "header"> </div> <div id="menuarea"> <ul id="navbar"> <li><a href="">Root</a></li> <li><a href="archive.php">Archive</a></li> <li><a href="search.php">Search</a></li> <li><a href="mailme.php">Email Me</a></li> <li><a href="http://feeds.feedburner.com/kashiflocalhost/root"><img src="http://kashif.f2o.org/xml.gif" align="middle" border="0"/></a></li> <li><a href="http://my.msn.com/addtomymsn.armx?id=rss&ut=http://feeds.feedburner.com/kashiflocalhost/root&tt=CENTRALDIRECTORY&ru=http://rss.msn.com'"><img src="http://sc.msn.com/c/rss/rss_mymsn.gif" alt="" style="border:0"/></a></li> <li><a href="http://www.bloglines.com/sub/http://feeds.feedburner.com/kashiflocalhost/root"><img src="http://www.bloglines.com/images/sub_modern6.gif" border="0" alt="Subscribe with Bloglines" /></a></li> <li ><a href="http://add.my.yahoo.com/rss?url=http://feeds.feedburner.com/kashiflocalhost/root"><img src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif" width="91" height="17" border="0" align="middle" alt="Add to My Yahoo!"></a></li> </ul> </div> <div class = "entry"> Ack comment spam, not as bad as some sites but still undesireable ...... maybe another project for the summer lol Update: Made a couple of changes in the code , and hopefully this should keep the comment spamming at bay.Ack comment spam, not as bad as some sites but still undesireable ...... maybe another project for the summer lol Update: Made a couple of changes in the code , and hopefully this should keep the comment spamming at bay.Ack comment spam, not as bad as some sites but still undesireable ...... maybe another project for the summer lol Update: Made a couple of changes in the code , and hopefully this should keep the comment spamming at bay.Ack comment spam, not as bad as some sites but still undesireable ...... maybe another project for the summer lol Update: Made a couple of changes in the code , and hopefully this should keep the comment spamming at bay.Ack comment spam, not as bad as some sites but still undesireable ...... maybe another project for the summer lol Update: Made a couple of changes in the code , and hopefully this should keep the comment spamming at bay.Ack comment spam, not as bad as some sites but still undesireable ...... maybe another project for the summer lol Update: Made a couple of changes in the code , and hopefully this should keep the comment spamming at bay.Ack comment spam, not as bad as some sites but still undesireable ...... maybe another project for the summer lol Update: Made a couple of changes in the code , and hopefully this should keep the comment spamming at bay.Ack comment spam, not as bad as some sites but still undesireable ...... maybe another project for the summer lol Update: Made a couple of changes in the code , and hopefully this should keep the comment spamming at bay.Ack comment spam, not as bad as some sites but still undesireable ...... maybe another project for the summer lol Update: Made a couple of changes in the code , and hopefully this should keep the comment spamming at bay. <p class = "commentsarea"> <a href = "comment.php">Comments (1)</a> </p> </div> <div class = "entry"> This where the enteries will go. 2 <p class = "commentsarea"> <a href = "comment.php">Comments (1)</a> </p> </div> <div class = "entry"> This where the enteries will go.3 <p class = "commentsarea"> <a href = "comment.php">Comments (1)</a> </p> </div> <div class = "entry"> This where the enteries will go.4 <p class = "commentsarea"> <a href = "comment.php">Comments (1)</a> </p> </div> <div class = "entry"> This where the enteries will go.5 <p class = "commentsarea"> <a href = "comment.php">Comments (1)</a> </p> </div> <div class = "entry"> This where the enteries will go.6 <p class = "commentsarea"> <a href = "comment.php">Comments (1)</a> </p> </div> <div class = "entry"> This where the enteries will go.7 <p class = "commentsarea"> <a href = "comment.php">Comments (1)</a> </p> </div> </div> </body> </html> Thanks Hi all, I have a div relatively positioned & floated left in a wrapper, with a php-generated list inside. css for the column: #leftcolumn { width:200px; position:relative; float:left; background:#F0F0F0; border:solid 1px #CCC; padding:2px; margin-top:10px; overflow: none; } and for the list: ul.list { font-family:Verdana, Arial, Helvetica, sans-serif; color:#000; font-size:11px; } and lastly, the html/php: <div id="leftcolumn"> <? echo "$db_list"; ?> </div> the problem: the list text is overrunning the right border of the div in safari and firefox. (i'm running the app locally on a mac so i can't test in IE, but that probably works). how come the list is not wrapping? it's like the text of the list is sitting on top of the containing div, or something. anyone? bueller? When I allow scripts and active x to run in IE I get a dotted border around each letter of hyperlinked text. It looks fine in other browsers and also in IE if I block scripts. Does anybody have any ideas how to fix this or if it really is a CSS problem? Thanks Hi. This is template I copied just for fun in joomla http://www.worldoffashion.info/test/. I wonder how to move text from border as you can see in gray boxes text is near border. I tried padding but then it makes whole box larger Hi, I am making a website for my friend that lost her myspace acount becuase of here small uncle. So I want to make a website for her that is simmular to myspace. So my question is: How do I add in text up the top in the border that is 15xp? Thank you. 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! I am using the code shown he http://webdesign.about.com/od/css/a/aa072406.htm Code: .container {background:#ccc; color:#fff; margin:0 15px;} .rtop, .rbottom{ display:block; background:#fff; } .rtop *, .rbottom *{ display: block; height: 1px; overflow: hidden; background:#ccc; } .r1{margin: 0 5px} .r2{margin: 0 3px} .r3{margin: 0 2px} .r4{ margin: 0 1px; height: 2px } Code: <div class="container"> <b class="rtop"><b class="r1"></b> <b class="r2"></b> <b class="r3"></b> <b class="r4"></b></b> CONTENTS GOES HERE <b class="rbottom"><b class="r4"></b> <b class="r3"></b> <b class="r2"></b> <b class="r1"></b></b> </div> the code works ok, but i would like it tweaked so the text is not so close the the egdes, the top and bottom seems ok but it is the left and right margins that are too close to the edges, can these inner margins be increased so the text is not so close? thanks in advance for your help I am at a total loss on this one. I'm trying to create a simple inline unordered list menu - no problems there - I've done that plenty of times. However, this time I would like my menu to have a border around it instead of being a plain box. As soon as I add the 'border-style:solid' modifier to the div, the text misaligns straight down, roughly 15px lines, out of the box. This happens on Firefox (and apparently on Opera as well, though I haven't checked that one myself). At this point I've stripped the page to bare bones, switched from transitional to strict, tried float vs not, tried margins vs 0 margins, and padding vs 0 padding, relative vs absolute, and attempted to manually shift the text through negative positions as well. No joy. Css: Code: /* Navigation */ #nav { width: 821px; height: 18px; border: 1px; border-style: solid; border-color:red; } #nav ul { } #nav li { display:inline; float:left; background-color:#9E0C0C; text-align:center; color:white; font-family: arial, san-serif; font-size: 14px; font-variant: small-caps; } and page: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" > <link href="style.css" rel="stylesheet" type="text/css" media="screen"> </head> <body> <div id="nav"> <ul> <li>Home</li> <li>XXX</li> <li>XXX</li> <li>CCC</li> <li>HHH</li> <li>JJJ</li> <li>kkk</li> <li>KKK</li> </ul> </div> </body> </html> (As I said, I've stripped it to absolutely nothing else.) Any suggestions would be welcome. (ETA: Also tried changing text size in case a too-large font size was making the text 'pop out' of the box. That is also not it.) I have a blog and I want to put my text inside a border/wrapper. So I've made the border and sliced it up into 3 parts: top middle and bottom. I want to place the text content within the middle of this graphic and so I figure I need to make the sliced images as a background using css and then type whatever I want over it. So I did this but dont know what Im doing wrong: Code: <style type="text/css"> top {background: url('/images/t1.gif') ;} middle {background: url('/images/t2.gif') ;} bottom {background: url('/images/t3.gif') ;} </style> <div class="top" id="top"></div> <div class="mid" id="mid"> <div class="content" id="content">Content Goes Here</div> </div> <div class="bottom" id="bottom"></div> Any help is appreciated. JH Hi. Have created some simple tabs using table cells. Active tab should have bottom-border color equal to page background-color. Non-active tabs should have bottom-border=black. Works fine in IE, but does not work very well in Firefox. If I remove the border-collapse:collapse on the table, then firefox also work... but I would like to be able to keep the 1px border between each table cell. So is there a way to make this work in both IE and Firefox... and hopefully most other browsers... See code below: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html> <head> <style type="text/css"> a.menu_top:link {color: #000000; text-decoration: none;} a.menu_top:visited {color: #000000; text-decoration: none;} a.menu_top:hover {color: #000000; text-decoration: none;} a.menu_top:active {color: #000000; text-decoration: none;} td.menu_top_passive { background-color: #777; border-left: 1px #000000 solid; border-right: 1px #000000 solid; border-top: 1px #000000 solid; border-bottom: 1px #000000 solid; text-align: center; cursor:pointer; font-weight: bold; padding: 5px 20px 5px 20px; margin: 0; } td.menu_top_active { background-color: #bbb; border-left: 1px #000000 solid; border-right: 1px #000000 solid; border-top: 1px #000000 solid; border-bottom: 1px #bbb solid; text-align: center; cursor:pointer; font-weight: bold; padding: 5px 20px 5px 20px; margin: 0; } </style> <script language="JavaScript"> function change(id, url) { for (i=1; i<6; i++){ eval("document.getElementById("+i+").className='menu_top_passive'"); } eval("document.getElementById("+id+").className='menu_top_active'"); } </script> </head> <body style="margin:0; padding:0; background-color:#bbb;"> <br><br> <center> 1. Load the page.<br> 2. Click Item 4.<br> 3. Click Item 2.<br><br> Why is the bottom border of the menuelements (table cells) not getting correct in Firefox?<br> None-active menuelements should have a border-bottom = black, active should have same bottom-border as page.<br> Notice that I use border-collapse on the table in order to get the cell-border 1px thick between the menuitems.<br> If I remove border-collapse, then there is no strange behaviour in Firefox.<br> Any way to get this working in Firefox without breaking it in IE? </center> <br><br><br> <table border="0" cellpadding="0" cellspacing="0" align="center" style="border-collapse:collapse;"> <tr> <td id="1" nowrap class="menu_top_active" onClick="change('1');"><a href="javascript:;" class="menu_top">Item 1</a></td> <td id="2" nowrap class="menu_top_passive" onClick="change('2');"><a href="javascript:;" class="menu_top">Item 2</a></td> <td id="3" nowrap class="menu_top_passive" onClick="change('3');"><a href="javascript:;" class="menu_top">Item 3</a></td> <td id="4" nowrap class="menu_top_passive" onClick="change('4');"><a href="javascript:;" class="menu_top">Item 4</a></td> <td id="5" nowrap class="menu_top_passive" onClick="change('5');"><a href="javascript:;" class="menu_top">Item 5</a></td> </tr> </table> </body> </html> I'm a little puzzled by this weird display bug by IE7, this bug doesn't occur in IE6. It had to do with the DIV's CSS's border-style. If you set it to double then you notice some random bugs with it. Some of the time, the border is displayed without a problem. Some of the time, it is displayed with some gaps in the line as if it is not being drawn upon. Some of the other time, it is not displayed at all. I noticed if I switch from one tab to another then back, the border appeared as if nothing had happened. I also noticed that if I open the view source that overlapp the web browser then closed it, the border appeared as if nothing had happened. How do you fix that problem? Thanks... I have my links defined with a dashed border, but I don't want this on linked images and I'm trying to figure out if I can accomplish this with CSS only without additional markup in my HTML file. Here is a sample file: http://www. shawkey.com/test/imagebordertest.html Any suggestions on how I can get the dashed border to not appear below the image and only appear below the text with just CSS? I would like to set up a table with a different border than the cells inside it. Here's my code: 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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> TABLE {border: 1px solid black; border-collapse: collapse; width: 200px} TD {border: 1px solid #ccc} </style> </head> <body> <table> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </table> </body> </html> That's all hunky dory in (gasp!) IE, but good browsers...they only show the lighter gray color. How do I get the table border to be different? Hi, This used to be my solution: Code: <table border=1 bordercolorlight='#CCCCCC' Bordercolordark='#FFFFFF'> But this only works well on IE - not Mozilla Now I want to use CSS: Code: .results { border: 1px solid #CCCCCC ; } Code: <table class='results'> --------------- The problem is, with CSS, only the TABLE acquires the border property. The cells within it don't. If I specify Code: <td class='results'> for all the cells in the table, this also won't work, because the cell borders overlap each other and some border lines seem thicker than others (because of overlapping). Is there any simple way I can specify the border property for the table - in ONE declaration? I want the table and td borders all to be a simple 1px width ...is that possible in one declaration? Thanks a lot! |