CSS - Float/border-bottom Overlap Problem
I am modifying an X-Cart implementation that the template originally put the product image in a seperate td. I have modified it to put the image in the same td as the description and used a float style on a div tag. The text is wrapping correctly. The problem is that I have a border-bottom style on the product name and it is ending up under the product image. The image is also covering the bullet on li tags.
An example is http://www.adaappliances.com/produc...48&cat=0&page=1. Please do not attempt to order anything! This is not a live site yet. This is a snippet of the code. I am using inline styles for testing. Code: <div style="float:left; padding:5px"> <IMG id="product_thumbnail" src="/image.php?productid=16148" width="168" height="230" alt="Eurotech EDW254E Dishwasher" border="0"></div> <p style="border-bottom: 1px solid black"><font size="3"><strong>Eurotech EDW254E Dishwasher </strong></font></p> I have not found a way to fix this. Any suggestions? Similar TutorialsHi. 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> Hi, Small problem he http://www.salewhale.com/z.html The box with the "What would you like to do?" is as follows: Code: <div class="boxarea"> <div class="boxarea_left"><b>What would you like to do?</b></div> <div class="boxarea_right"><a href='3_changepass.php'>Change Password</a></div> </div> The CSS for this is: Code: .boxarea { border: 1px solid #0000FF; background-color: #F5F5F5; padding: 2px 2px 2px 2px; } .boxarea_left { width: 140px; float: left; } .boxarea_right { width: 300px; } The point is to have the left column (boxarea_left) as 140px, so that the text wraps to the next line. Does anyone have any idea why the border box doesn't really take account of the new line? It simply ignores the divs and has a basic one line height. Of course, if I put a spacer within the boxarea div, the problem will be solved - but this leaves a gap at the bottom of the box - which I dont want. Is there a simpe fix? Thanks very much! It's hard for me to explain this so bear with me. This is the page in question. The right side is my float. If it is longer than the left side, then it continues, but the white background does not. I've tried doing height: 100% and so forth and can't get it to stretch. I've tried reversing the float assigning it to the left side and it appears fine in Net/Moz, but IE won't run it right. I don't really want to use float but I can't find another way to do it. I'm redoing the site from tables to CSS to make it cleaner. Floating has always been a problem but I've found ways to deal with it. Now, I'm realizing how finicky it is on different browsers. Any suggestions or alternatives to float? The heights of both sides may change at any point so I don't really want to use any position elements. Will I have to? Thanks in advance. Tim Well, I'm trying to make a comments-page for a certain thing, and I can't get the image to stop going over the bottom of the div, without using the min-height property. Can someone help?
Code: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> <head> <meta http-equiv="Content-Type" content="application/xhtml+xml; encoding=UTF-8;" /> <title>Comments on 2005-02-10: February 10, 2005</title>\n <link rel="stylesheet" type="text/css" href="comments.css" /> </head> <body> <h2>Posting on 2005-02-10: February 10, 2005 in <a href="refresh.php" id="title">XMLBlog</a></h2> <div id="entry" xml:lang="en-US" lang="en-US"> <img src="../resources/images/Neil_Euphonium_3_[F][S{600,h}][32k].png" alt="New Euphonium!" title="New Euphonium!" style="width:30%;" class="left" /> <p class="dream">I can only remember two things... That there were a whole bunch of people from my school playing baritones, which was kind of creepy in this case <em class="entry">and</em> that my section from school in real life and I played this freaky, nonexistent Zelda games. One was for a calculator I had only owned in the dream, and it was spectacular! </p> <p class="normal">I brought my "newphonium" to school today.</p> <p class="normal">We had a pretty normal session in Jazz. <em class="entry">Someone actually got a trombone solo.</em></p> <p class="normal">Our teacher was back. The entire first half of the period going over our homework. <em class="entry">We learned that dropping a penny off of the <strong class="entry">Space Needle</strong> is very dangerous, since even a baseball would get going at 120 MPH.</em> Later, we began how to calculate things dealing with gravity with a position other than 0 and a velocity over 0.</p> <p class="happy">We didn't do much in Japanese. All we really did was read Katakana and finish our puzzle. <em class="entry">A few of us found new words.</em> I also told our sensei that my real Japanese same from my ancestors is <ruby><rb>たけした</rb><rt>take****a</rt></ruby>. During resource, I looked over this book with a couple of friends of mine and their friend. <em class="entry">It was so funny, too!</em></p> <p class="normal">In Health, we continued our lecture on alcohol. <em class="entry">There were some inspiring articles and poems on the subject.</em></p> <p class="happy"><span class="normal">Class started off with a lock-down. <em class="entry">I used this time to complete a gravity-based program for physics.</em></span> to Due to my premature completion of the paragraph that was due at the end of the period, I just listened to music and read for the majority of English. <em class="entry">A big guy in the <info popup="State of Fear">book I'm reading</info> died.</em></p> <p class="sad">Before actually eating, I wandered a bit. <em class="entry">It made it so I didn't have to carry my backpack around wherever I went.</em></p> <p class="normal">We continued on proofs. <em class="entry">It took a bit of effort to do.</em> <span class="happy">Still, we finished the investigation.</span></p> <p class="normal"><span class="happy">I got my new euphonium for class.<em class="entry">It sounded very nice.</em></span> Though, for a majority of the time I didn't do anything with my section, due to his preoccupation with a couple of other kids.</p> <p class="happy">I got a ride home</p> <p class="normal">I had a practice session with my mom, which wasn't the most successful.</p> <p class="happy">Once done with my homework, I took a two-hour nap.</p> <p class="dream">The entire thing revolved around this country area that had tiny roads and a <info popup="The salmon eggs would get bigger, then would grow spikes and split apart before returning to their grating to mature more">freaky salmon farm</info>. Also, I remember psychically communicating with my section from Band. <span class="hider">I actually cried over the idea of losing him, but I didn't have tears when I awoke.</span> Also, my old friend, who is a freshman now, was mentioned.</p> <p class="happy">The dream gave me the idea to call him up. <em class="entry">Apparently, the call woke him up.</em> We talked about how our lives were going, along with school. <em class="entry">Apparently, the school banned people from using their calculators. How could they!? He also told me that some kids were goofing around during Breakout library time.</em> We scheduled a time to meet and talk about some more things. <em class="entry">I could show him Linux.</em></p> <p class="happy"><strong class="entry">I fixed the comments system!!</strong> <em class="entry">Have fun posting.</em></p> </div><p>No comments</p><hr /><form action="postcomments.php?ie=&title=February 10, 2005&date=2005-02-10" method="post" name="comment" id="main"> <div class="right"> <img src="comments_files/right_main_bar.png" alt="right_side" /> </div> <div class="left"> <img src="comments_files/left_main_bar.png" alt="left_side" /> </div> <div class="center"> Date: <input type="textarea" class="upper" name="date" value="2005-02-10" readonly="readonly" /> Title: <input type="textarea" class="upper" name="title" value="February 10, 2005" readonly="readonly" /> <br /> Name: <input type="textarea" name="name" class="lower" /> E-mail: <input type="textarea" name="e-mail" class="lower" /> </div> <div class="comment"> <input type="textarea" name="comment" class="text" /> <input type="submit" value="Post!" class="click" /> </div> </form> </body> </html> CSS: Code: h2 { text-align:center; font:bold italic 3em/1.5 'Pepita MT', 'Lucida Handwriting', 'Sans-Serif'; color:rgb(0,150,150); } h3 { text-align:center; font: italic normal 2em/1.5 'Lucida Calligraphy', 'Sans-Serif'; color:rgb(0,0,150); } form#main { display:block; } form#main div.left { float:left; background-color:rgb(255,255,255); } form#main div.right { float:right; background-color:rgb(255,255,255); } form#main div.left img, form#main div.right img { height:60px; } form#main div.center { background-color:rgb(0,0,0); background:url(comments_files/center_main_bar.png); font:bold normal 1em/1 'Times New Roman', 'Courier New', 'Sans-Serif'; color:rgb(255,255,255); padding:2px 18% 2px 28%; } form#main div.center input.upper { height:20px; filter: alpha(opacity=50); -moz-opacity: .5; display:inline; width:20%; margin:2px 10% 2px 0; } form#main div.center input.lower { height:20px; filter: alpha(opacity=50); -moz-opacity: .5; display:inline; width:20%; margin:2px 8% 2px 0; } form#main div.comment { width:95%; border:1px solid rgb(0,150,150); } form#main div.comment input.text{ width:90%; margin:5px 5% 5px 5%; height:100px; } form#main div.comment input.click { width:25%; margin:5px 37.5% 5px 37.5%; } body p { text-align:justify; font: italic normal 1.2em/1 'MS Mincho', 'SimSun', 'Sans-Serif'; color:rgb(150,0,0); } a { color:rgb(0,100,0); text-align:left; } a:hover { font-weight:bold; color:rgb(0,255,0); border:1px solid rgb(0,255,0); } a#title { color:rgb(0,100,0); text-decoration:none; margin-left 25%; text-align:left; } a#title:hover { font-weight:bold; color:rgb(0,255,0); border:1px solid rgb(0,255,0); } div.comment a.mail { font:normal normal 1.2em/1.1 'MS Mincho', 'SimSun', 'Courier New', 'Sans-serif'; color:rgb(0,100,0); text-decoration:none; text-align:left; } div.comment a.mail:hover { font-weight:bold; color:rgb(0,255,0); border:1px solid rgb(0,255,0); } div.comment span.mail { margin-left 25%; font:normal normal 1.2em/1.1 'MS Mincho', 'SimSun', 'Courier New', 'Sans-serif'; color:rgb(0,0,150); text-align:left; } div.comment { border-bottom:2px dotted rgb(0,0,255); margin:1.5em; } div.comment p { font:normal normal 1.2em/1.1 'MS Mincho', 'SimSun', 'Courier New', 'Sans-serif'; display:block; } /* ENTRY */ div#entry { border:4px double rgb(0,0,0); padding:0.25em; margin:0.5em; min-height:79em; } div#entry p { font:normal normal 1em/1.2 'Tempus Sans ITC', 'Nimbus Roman', 'Times New Roman', 'Serif'; text-indent:2em; text-align:justify; } div#entry p.dream { font:normal normal 1em/1.2 'Lucida Handwriting', 'URW Chancery L', 'Serif'; color:rgb(150,150,0); text-indent:2em; text-align:justify; } em.entry { font-style:italic; } strong.entry { font-weight:bold; } span.uentry { text-decoration:underline; } span.hider { color:rgb(255,255,255); } div.story { border-left:2px solid rgb(0,0,0); border-top:2px solid rgb(0,0,00; } div.story div.title { border-bottom:1px solid rgb(128,128,128); border-right:1px solid rgb(128,128,128); font:italic normal 1.5em/1.2 'Tempus Sans ITC', 'Nimbus Roman', 'Times New Roman', 'Serif'; width:50%; text-align:center; } div.story div.storybody { padding:0.25em; } span.happy, p.happy { color:rgb(0,100,0); } span.sad, p.sad { color:rgb(0,0,100); } span.normal, p.normal { color:rgb(100,0,0); } img.center { margin:0.25em auto; } img.right { float:right; margin:0.25em; } img.left { float:left; margin:0.25em; } Hi Could someone take a look at this please http://dmumford.bizhat.com/test.htm You will see that in IE5 the border-bottom is about 2 pixels bigger than in other browsers, I have speciifed border-bottom:1px solid #fff;, but IE5 is making this bigger..........why???? Thanks for any help Hi, I have a list that shows the photo and some personal data of people. Here it is: http://www.tiregarfio.byethost17.co...ev.php/miembros username: fer password: m I you load it with FF, you can see clearly I have added a green line that separate each member (border-bottom: solid 1px #A9F16C). This line in IE6 is not between each member but below the personal data. Here it is the styles: Code: div.miembro { overflow: hidden; clear: both; border-bottom: solid 1px #A9F16C; } div.fotografia { float:left; } Any idea? Javi This is killing me! The border of a DIV top is working perfectly on FF but not applying on top in IE 6+7. Here are the class attributes: {padding:1px 7px 3px; font-size:16px; border-color:#555555; border-style:solid; border-width:1px 1px 0px; text-decoration:none; color:#425366; background-color: #abd3ff; font-weight:bold;} Not sure if the problem is on this class or in anything that affecting it. Any suggestions will be great. Ehud I currently have a problem with chrome not displaying a page properly under windows that a user emailed me about. I have tested on my windows xp install with chrome and i do not see the error: What he sees: http://i43.photobucket.com/albums/e397/clericvash/chrome-xp-sp3.gif What i see: http://i43.photobucket.com/albums/e397/clericvash/Clipboard01-2.jpg Just below the logo you have the main links "home, rules" etc but on his install the line below the links is way too far down, same version of chrome and all. Code: Code: .menu_fancy { width: 100%; } .menu_fancy ul { margin: 0; padding: 0; float: left; list-style-type: none; } .menu_fancy ul li { text-align: center; float: left; padding: 0px 10px 3px 10px; margin-left: 5px; border-bottom: 1px solid #0099CC; border-top: 1px solid #FFFFFF; border-left: 1px solid #FFFFFF; border-right: 1px solid #FFFFFF; display: block; } .menu_fancy ul li a { text-decoration: none; padding: 5px; display: block; } Sitewide, I have a bottom border affect, rather than an underline for links. But it applies itself to linked images as well. I have borders shut off on images, but that doesn't stop it from applying the border. I've tried img border:none; and a few other tricks, but it only does the trick in Chrome. CODE: a { text-decoration: none; } a:hover { text-decoration: none; border-bottom-width: 1px; border-bottom-style: solid; padding-bottom: 2px; } img { border-width: 0px; } img a { border-width: 0px; } img a:hover { border-width: 0px; } http://www.brendanclements.com/ups/ http://www.brendanclements.com/ups/styles.css It's the slideshow swf on the right. The bottom has a sliver but the heights are both at 300 px. I know I used tables too much but it's been way too long since I've done CSS positioning so I'm doing this for now. I believe the sliver is caused because the slideshow box has a rowspan of 2 since the slideshow does not require a title but I can not figure out how to get rid of it. Thank you. hi there, i have a local web page that im trying to build. Its a three column fixed layout. The 3 columns have been floated and are contained by a container div element. I have implemented the bug fix (see http://www.positioniseverything.net/easyclearing.html) to ensure that the containing div wraps around the three floated columns and this works for both FF and IE. However, i have one remaining problem. I'd like to display a right and left sided border to the "middle" floated div and this needs to stretch down to the bottom of the containing div element. However, i cannot get this to work. Does anyone have any suggestions? Please see the attachments for the files Thanks I have a header where I have two different div's that need to sit opposite each other on the same line (one aligned right and the other left). I used a float since it was the simplest way to get the job done. But in the div floating right I have three hyperlinks that have borders. When I float the div the border on the top and bottom dissappear when I remove the float the border on the top and bototm re-appear. any ideas? Here's the CSS... It's raw as I'm still developing these sections. Code: #headerRight { float: right; } #headerLeft { float: left; } #header a:link { border: #000 solid 1px; text-decoration: none; } #header a:active { border: #000 solid 1px; text-decoration: none; } #header a:hover { border: #000 solid 1px; text-decoration: none; background-color: #333; color: #ffffff; } #header a:visited { border: #000 solid 1px; text-decoration: none; } I've got a div (picright) within a div that has an image with a border. The border works, but for some reason there's a teeny tiny gap between the bottom of the image and the border. (At least on a Mac using FF.) .picright { float: right; border: solid 1px #9F7A47; margin: .3em .3em .5em .5em; padding: 0; } Then I thought maybe I needed a rule for the img, so I added .picright img { margin: 0; padding: 0; } but that didn't fix it. Any guesses? Yes........it's me again with more problems. In trying to solve some other problems I went to using contrasting bg colors so I could see what was going on per Kravvitz suggestion. So here is what I have body bg color set at gold #whiteBorder - set at white #page bg set at green; border hot pink and then #topbar and #sideColumn set at powder blue. The problems is that the 10px whiteBorder shows on the top and left - but not on the right and bottom and I have no clue why. Here is the css: Code: body { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px; text-align: center; background-color: #FFCC33; color: #515151; margin:0px; padding:10px; } /*page container settings*/ #page { width: 750px; height: 600px; border: 1px solid #FF00FF; background-color: #339900; overflow: hidden; margin: auto; text-align: left; } #whiteBorder { border: 10px solid #FFFFFF; width: 100%; height: 100%; } /*text*/ .large { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #5094F9; font-size: 18px; font-weight: bold; margin-bottom: 15px; } h1 { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #5094F9; font-size:20px; font-weight: bold; margin-bottom: 10px; } h2 { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #5094F9; font-size: 16px; font-weight: bold; } h3 { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #5094F9; font-size: 12px; font-weight: bold; } h4 { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #5094F9; font-size: 14px; font-weight: bold; } p a:link, a:visited { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #5094F9; font-size: 12px; font-weight: bold; } p a:hover, p a:active { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #990099; font-size: 12px; font-weight: bold; } /*logo header and tag settings*/ #header { margin: 0; padding-bottom: 5px; width: 450px; height: 36px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #5094F9; text-align: left; } #header img { vertical-align: -7px; } .tagline { color: #5094F9; font-size: 16; font-style: italic; font-weight: bold; display: inline; clear: both; line-height: 20px; margin-left: 10px; } /*top bar settings*/ #topbar { float: top; height: 20px; background-color: #5094F9; clear: both; padding-left: 10px; text-align: left; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; font-size: 12px; font-weight: bold; } #topbar a:link, #topbar a:visited { background-color: transparent; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #FFFFFF; font-size: 12px; font-weight: bold; } #topbar a:hover, #topbar a:active { background-color: #FFFFFF; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #5094F9; font-size: 12px; font-weight: bold; } #topbar ul { list-style: none; margin: 0; padding-top: 2px; } #topbar li { display: inline; margin-right: 160px; } /*Main Section two columns under top section*/ #wrapper{ width: 100%; height: 100%; } #sideColumn { float:left; width:155px; height: 100%; background-color: #5094F9; padding-top: 50px; padding-left:10px; padding-bottom:10px; pading-right: 10px; text-align: left; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; font-weight: bold; line-height: 20px; } .category { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; font-size: 16px; font-weight: bold; letter-spacing: 5px; } #sideColumn a:link, #sideColumn a:visited { background-color: transparent; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #FFFFFF; font-size: 12px; font-weight: bold; } #sideColumn a:hover, #sideColumn a:active { background-color: #FFFFFF; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #5094F9; font-size: 12px; font-weight: bold; } #sideColumn ul { list-style: none; padding: 15px 0px 15px 10px; margin: 0px; } #mainColumn { padding: 0px; margin-left: 185px; } Here is the xhtml: Code: <body> <!--begin page --> <div id="page"> <!--begin white border --> <div id="whiteBorder"> <!--begin header --> <div id="header"><img src="../images/vitalograph_spirometers_logo.gif" width="230" height="36" alt="vitalograph spirometers logo" /> <span class="tagline">world leaders in spirometry</span> </div> <!--end of header --> <!--begin topbar --> <div id="topbar"> <ul> <li><a href="../index.html">Home</a></li> <li><a href="../about_us/about_us.html">About Us</a></li> <li><a href="../other_regions.html">Other Regions</a></li> </ul> </div> <!--end topbar --> <!--begin wrapper--> <div id="wrapper"> <!--begin side column --> <div id="sideColumn"> <span class="category">Products</span> <ul> <li><a href="../products/spirometers.html">Spirometers</a></li> <li><a href="../products/clinical_trials.html">Clinical Trials</a></li> <li><a href="../products/asthma_copd.html">Asthma & COPD</a></li> <li><a href="../products/smoking_cessation.html">Smoking Cessation</a></li> <li><a href="../products/resuscitaion.html">Resuscitation</a></li> </ul> <span class="category">Resources</span> <ul> <li><a href="../resources/customer_support.html">Customer Support</a></li> <li><a href="../resources/training_services.html">Training & Services</a></li> <li><a href="../resources/exhibitions.html">Exhibitions</a></li> <li><a href="../resources/newsletters.html">Newsletters</a></li> <li><a href="../resources/downloads.html">Downloads</a></li> <li><a href="../resources/useful_links.html">Useful Links</a></li> <li><a href="../resources/industry_information.html">Industry Information</a></li> <li><a href="../resources/industry_information.html">Sitemap</a></li> </ul> </div> <!--end of side column --> <!--begin main column --> <div id="mainColumn"> <!-- TemplateBeginEditable name="Main_Section" -->Main_Section<!-- TemplateEndEditable --> </div> <!--end of main column --> </div> <!--end of wrapper--> </div> <!--end of white border --> </div> <!--end of page --> </body> Thanks hi. I need some formatting help. I am using niftycorners and the linked list tabs I am building seem to rest at the bottom, pushing the bottom of the rounded corners to the right of them. I have tried clear:left, clear:right, clear:both at the div and ul levels but that doesnt work. any ideas? I have attached a picture of the problem. Here is the CSS/HTML: Code: <style> body { margin:20px; } #toptabs { clear:left; } #toptabs ul { clear:left; position:relative; width:100%; margin-bottom:0; list-style:none; line-height:1em; padding:100px 0px 0px 0px; } #toptabs ul li { float:left; margin-right:5px; padding:0; } #toptabs ul li.clear { clear:right; } #toptabs a { display:block; color:#444; text-decoration:none; font-weight:bold; background:#ddd; margin:0; padding:0.25em 1em; border-left:1px solid #fff; border-top:1px solid #fff; border-right:1px solid #aaa; } #toptabs A:hover, #toptabs A:active, #toptabs A.he link, #toptabs A.he visited { background:#bbb; } #toptabs A.he link, #toptabs A.he visited { position:relative; z-index:102; } </style> </HEAD> <BODY> <div id="header"> <div id="toptabs"> <ul id="venture"> <li id="current"><a href="#"><span>Profile</span></a></li> <li><a href="#"><span>Q&A</span></a></li> <li><a href="#"><span>Recommendations</span></a></li> <li><a href="#"><span>Connections</span></a></li> </ul> </div> </div> </BODY> I'm trying to put a 1px line on the bottom of my header that spans the width all the way. I've used border-bottom: 1px and border-style: solid; but I still have a looks like 3px border all the way around my header. Also I have my unordered list inside of my header div and it's placed directly below my header. Any help much appreciated, just learning how to layout. http://imgbin.org/index.php?page=image&id=6637 CSS code Code: body { font-family: "Lucida Sans Unicode", sans-serif, Verdana; background-color: #999999; } #header { height: 75px; width: 100%; border: 0px 0px 1px 0px; border-style: solid; border-color: white; background-color: #336699; } #container { margin: 0 auto; width: 900px; height: 100%; background-color: #666666; } #content { width: 75%; } #sidebar { width: 25%; background-color: #666666; } ul { list-style-type: none; } li { display: inline; } and HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Jeremy</title> <link href="default.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="header"> <h1 class="header">Jeremy</h1> <ul> <li><a href="index.html">Home</a></li> <li><a href="portfolio.html">Portfolio</a></li> <li><a href="forums.html">Forums</a></li> <li><a href="contactme.html">Contact Me</a></li> </ul> </div> <div id="container"> <div id="sidebar"> </div> <div id="content"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed porttitor dui sit amet diam molestie cursus. Vivamus a sapien sed nunc fermentum feugiat. Donec iaculis neque sit amet tortor consectetur eu lacinia est commodo. Ut lobortis fermentum felis, eu tristique elit fermentum sed. Etiam pulvinar commodo est non vestibulum. Aenean sed ante in velit vulputate tristique. Duis lacinia eleifend massa, sed volutpat dolor malesuada at. Nam convallis consequat mauris imperdiet rutrum. Aenean vitae vestibulum libero. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum lorem nulla, pellentesque vitae porttitor condimentum, dignissim a libero. In quis turpis orci, vitae faucibus risus. Duis tincidunt, libero tincidunt hendrerit viverra, felis lectus rutrum diam, et dictum mauris ipsum nec purus.</p> <p>Vivamus ut nunc vitae eros fermentum pretium. Nunc molestie odio vitae magna consectetur quis ultricies purus adipiscing. Curabitur ante nisl, scelerisque a consequat sed, rhoncus at turpis. Morbi blandit ante eu tellus facilisis eu semper enim auctor. Nunc sollicitudin orci nunc, vitae accumsan risus. Etiam nec est in ipsum iaculis varius. Nam enim velit, imperdiet viverra condimentum vitae, egestas eget dolor. Nullam facilisis condimentum diam, in euismod lorem mattis a. Mauris vel nulla et ipsum venenatis aliquam vitae a nibh. Nunc commodo ullamcorper odio vitae fermentum. Praesent faucibus blandit condimentum. Integer sed justo nulla. Praesent id gravida dui. Proin malesuada interdum scelerisque. Sed condimentum justo nec metus venenatis accumsan.</p> </div> </div> </body> </html> ok i have links on the side, i have applied border-bottom:0.1em solid black properties so they look like they are underlined. Now it all works but sometimes when i scroll the page down and then up, SOME of the link's border have disappeared, i can fix this by moving my mouse of the links and the border appear but i was wondering is it to do with CSS/html? the only other thing could be my Screen/monitor's refresh rate I use the following CSS for my links, and use a border-bottom to give them a dashed underline... Code: a { color: #AC4870; border-bottom: 1px dashed #DDDDDD; text-decoration: none; } a:hover { color: #DDDDDD; border-bottom: 1px dashed #AC4870; text-decoration: none; } This underline also shows up under my images that are used as links. How would you write CSS that would remove this dashed border-bottom from my image links? Thanks Maybe I should be posting this as a reply - this is an UPDATE: I used the WC3 Validator and it found an outright error in my code. So, gosh - ignore the posting below! And, uhm, I think I'll be using that handy-dandy WC3 tool more often.... ---------- Okay - I am a CSS dope - I've been using tables and antiquated code for a long time. I'm putting together a dummy site, just for testing, and I'm trying to postiion things with DIVs, etc. Be gentle - I'm 59, and, not that damned smart... I installed Dreamweaver and have been fooling with that as it has a lot of templates with proper CSS, tips, etc. But I've never used it before, so that's another learning curve. So, I have a page on which there are some DIVs and, in one, there is an extra space - and, an extra bottom border line - in Internet Explorer. I'm not fond of IE, but that isn't the point - a lot of people use it.....and I need to know why this is happening. Here's a link to an image of what it looks like in Explorer - the line at the bottom is absent in Firefox and Chrome: Screenshot The page is just the index page at: GuyMerritt.net The CSS files looks like this: Code: body { margin: 0 0 0 0; background: #FEFEEC; height: 1000px; background: #F9F9EE; } h2 {font-family: tahoma; font-size: 12px; font-weight: normal; padding-left: 5px; padding-right: 8px; color: #777772;} #header {height: 220px; background: url(../images/header_graphics.jpg); } #left-sidebar { float:left; width:20%; padding-left: 20px; } #right-sidebar { float:right; width:20%; padding-right: 20px; } #main-content {width: 54%;float: left;padding-top: 0px; } .sidebars-2 #content { width: 54%;float: left;padding-top: 10px; } #box { border-style: solid; border-width: .05em; font-family: arial; color: #777772; font-size: 13px; padding-left: 9px; padding-right: 9px; } img.example { width: 100%; max-width: 250px; height: auto; } div#slides { width: 500px; height: 280px; overflow: hidden; } div#slides div { height: 280px; width: 500px; font-size: 100px; line-height: 200px; text-align: center; color: #fff; } ul#ticker { height: 1.4em; overflow: hidden; border: solid 1px #aaa; background: #ccc; } ul#ticker li { padding: 0.2em 0; } /* @group global */ p#links { padding-top: 50px; clear: both; } a#avatar { position: absolute; bottom: 10px; right: 10px; } a#avatar img { border: none; } h1 { color: #0094d5; } a { color: #0094d5; } a:visited, a:hover { color: #00577e; } .red { background: #e40053; } .blue { background: #0094d5; } .green { background: #43aa38; } /* @end */ At the rate I'm moving, I'll be dead before I ever figure this stuff all out! If anyone could explain what's causing this I would be very grateful. And why do so many things render differently in Explorer (from Chrome and Firefox)? Thanks again, Guy Merritt, Flint, MI I like dashed underline links. The trouble is a couple of sections of my site use line-height and vertical-align to center their content. This means that applying a border-bottom: 1px dashed black; to an href has the effect that the underline appears at the bottom of the line height and not directly underneath the link. Is there a way to overcome this? |