CSS - Ie Borders Problem
Hi Guys,
Beat with me because ive just started using CSS for positioning etc and im giving it a whirl before I try it for a live project. I have an annoying problem though which I cannot seem to solve whereby the border doesn't show fully in IE but in Mozilla it does? I tried vary the code a bit in the CSS and I would either lose the top border, bottom border or both...? Bizarre. Here is the code it is very simple and you can see where I am going with it. I appreciate the help. Thanks! <style> body{ background-color: white; color: #0083D7; font-family: Arial, Helvetica, sans-serif; font-size: 100%; margin: 0; padding: 0; text-align: center; } #wrapper{ width: 770px; color: white; margin: 10px auto; text-align: left; color: #666666; } #logo{ height: 70px; } /** * Top Navigation Under Logo. **/ #nav{ margin: 0; padding: 0; } #nav ul{ padding: 0; margin: 0; } #nav ul li{ display: inline; padding: 0; margin: 0; } #nav ul li a{ font-size: 90%; color: #0083D7; font-weight: bold; text-decoration: none; text-align: left; border: 1px solid #0083D7; padding: 4px; line-height: 25px; } #nav ul li a:hover, #nav ul li a:focus{ background-color: #0083D7; color: #FFEF00; } </style> </head> <body> <div id="wrapper"> <div id="logo"></div> <div id="nav"> <ul> <li><a href="#">Holidays</a></li> <li><a href="#">Flights</a></li> <li><a href="#">Accommodation</a></li> <li><a href="#">Ski</a></li> <li><a href="#">Cruise</a></li> <li><a href="#">Holiday Insurance</a></li> <li><a href="#">Travel Guides</a></li> </ul> </div> </div> </body> Similar TutorialsHello, I have a list that looks like this Code: <ul> <li><a href="#"> List item 1</a></li> <li><a href="#"> List item 2</a></li> <li><a href="#"> List item 3</a></li> </ul> ... and my CSS for the list looks like this Code: ul { margin-left: 0px; list-style: none; border: none; border-top: 1px solid #000000; } li { border-bottom: 1px solid #000000; } li a { text-decoration: none; border-bottom: 1px solid #000000; border-left: 14px solid #82817C; color: #FFFFFF; background-color: #585752; } li a:hover { text-decoration: none; border-left: 14px solid #9D9E8E; border-bottom: 1px solid #000000; color: #FFFFFF; background-color: #585752; } My problem is that I can't get the borders go the way I want them to. As you can see, the list items have two borders, a left border and a bottom border. The unorganized list-tag has one border, a top border. In both cases, the top and bottom borders are 1px in height, and the left border is 14 pixels in width. The ul's top-border is full width, meaning it starts at the left side of the page, while again the li's bottom-border starts AFTER the left-border... ok, that was confusingly explained. What I'm trying to achieve is that the li's left-border is over lapped by it's bottom-border - so that the bottom border looks just like the ul's top-border. Ok, if you put the code to your editing program and view it "in action" you should be able to see what I mean. So to summarize it all, how can I force the bottom-border to over lap the left-border? Thank you in advance, - Kimppa hi all, hoping someone could help me with an issue i'm having in css involving borders (sort of). hopefully this is the appropriate place for this question, as it does involve some html. i have a page divided into three vertical frames (i know, i know...frames are not ideal. but i would like to keep the page in this format for specific reasons). the border is set to "0" in each frame, but on the left and right frames i use a bit of css code to create a colored border on the right hand side for the left frame, and on the left hand side for the right frame (it creates a kind of vertical outline for the middle frame). hopefully this makes sense. after completely finishing the website and uploading it to my ftp, i found that it works perfectly, except when opened in firefox or navigator. when opened with either of these browsers, the content and most of the design loads fine, but the colored borders in the outer frames are offset from their sides maybe a quarter of an inch. i can't figure out what's causing it, but i know it has something to do with the border code. as i would like this site to be as compatible as possible with most popular browsers, i'd like to try and fix this somehow. i've posted my code following this message in hopes that someone could offer suggestions. any advice would be greatly appreciated. frames created in index.htm: Code: <frameset cols = "25%, 50%, 25%" border = "0"> <frame name = "side1" src = "blankleft.htm" scrolling = "no"> <frame name = "middle" src = "main.htm"> <frame name = "side2" src = "blankright.htm" scrolling = "no"> </frameset> colored border for the left frame (side1): Code: <style type = "text/css"> body { border-left: 0px solid #607046; border-right: 2px solid #607046; border-top: 0px solid #607046; border-bottom: 0px solid #607046; } </style> colored border for the right frame (side2): Code: <style type = "text/css"> body { border-left: 2px solid #607046; border-right: 0px solid #607046; border-top: 0px solid #607046; border-bottom: 0px solid #607046; } </style> At this address my website form and shows differently in IE and Firefox. The questions I have a 1. the border I have coloured but in IE if I do not style it IE produces a nice rounded border but the wron colour. Does anyone know how to get the rounded border corners AND ones own colour? 2. In IE the space between the legend text and the first label text is OK but in Firefox is is greater for some reason. Any clues as to how to make it the same? img { border-width: 1px; border-color: transparent; } this is the code i used in my css sheet to invalidate the borders around the linked images. for some reason every other way i tried it was messing up my drop-down menu. now the only problem i have is that ie still shows the text-decoration. at the moment i haven't applied text-decoration none, but i have tried it and nothing worked. any other solutions? here's the page i'm applying it to:: page Hi guys, I am using the following css to style a content box: Code: /*---------------- Start of Testimonies Content Box ---------*/ #testimonies { WIDTH: 175px; MARGIN: -85px 0px 0px; POSITION: right; height: 60px; float:right; BORDER-RIGHT: #d9ddb9 1px solid; BORDER-LEFT: #d9ddb9 1px solid; BORDER-BOTTOM: #d9ddb9 1px solid; BORDER-TOP: #d9ddb9 1px solid; PADDING-TOP: 10px; PADDING-RIGHT: 10px; PADDING-BOTTOM: 20px; PADDING-LEFT: 10px; FLOAT: right; BACKGROUND-IMAGE: url(images/bg-down-right.gif); BACKGROUND-POSITION: 50% bottom; BACKGROUND-REPEAT: repeat-x; BACKGROUND-COLOR: #fafceb; } .testimonies-h2 { PADDING-RIGHT: 3px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; BACKGROUND-COLOR: #fafceb } #testimonies H2 { PADDING-RIGHT: 0px; BACKGROUND-POSITION: 2px 3px; PADDING-LEFT: 0px; FONT-WEIGHT: bold; FONT-SIZE: 100%; BACKGROUND-IMAGE: url(images/bg-h2.gif); PADDING-BOTTOM: 2px; TEXT-TRANSFORM: uppercase; COLOR: #8fa300; PADDING-TOP: 2px; BACKGROUND-REPEAT: repeat-x } /*---------------- End of Testimonies Content Box ---------*/ I want to add an inline frame inside the 'testimonies' div in my html but it keeps using the border styling of the css above. I tried using this to cancel it out (placing my inline frame in a span, but it did nothing) Code: #testimonials { border-left:none; border-right: none; border-bottom:none; border-top:none; } HTML CODE: Code: <div id="testimonies"> <h2><span class="testimonies-h2">Testimonials</span></h2> <span class="testimonials"> <!-- ========== V-NewsTicker v2.2 (Freeware) ============= --> <script type="text/javascript" src="v_newsticker_1.js"></script> <!-- ======================= --> </span> </div> Hi All, I am trying to set a style in my CSS that will show a border-bottom for an entire row. So far I can only get it to work on a per cell (<td>) basis. I am using Dreamweaver MX 2004 and when I select an entire row and assign it a style, it just add's it to the <tr> tags at the top of those rows. Code: <!-- This is a Row that is at the top of the table --> <table width="100%" border="0" class="fullwidth"> <tr> <td class="head">This is a header </td> </tr> </table> <!-- This is where I want the border-bottom attribute to show up --> <table width="100%" border="0" cellpadding="2" cellspacing="1" class="list"> <tr class="list"> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr class="list"> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr class="list"> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr class="list"> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr class="list"> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </table> Here is the CSS: Code: table.fullwidth {width: 100%; background-color: #FFFFFF; border: 0px; border-collapse: collapse; border-spacing: 0px;} tr.list {background-color: #EFEFEF; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; color: #000000; border-bottom: 1px dotted #000000;} Can any one suggest a better CSS script for having a border in IE So far I have the following: PHP Code: border: 1px solid #0099CC; The problem is that when ran in IE, the top border does not show. However it works fine in firefox. Also I get warnings on my script when I run my CSS validation tool. Can any one help. Thge URL is http://pfwd.org.uk/sfd/update_test3.php Is it possible to have more than one border in CSS? I want to have a grey and green border around an area of text, something like this. So is it possible to have two or more borders in CSS and if so, how? Hello, I can't for the life of me figure out how to get these thin white borders like on this website: http://www.viceland.com/index_us.php Is this done with a style sheet? I can't find any reference to a border. How is this done? I have a onMouseOver event that draws a top border over text. This works fine with Mozilla/Firefox, but it doesn't render in IE. I think I know why -- it's because I used CSS to position the text beforehand, and in IE it doesn't bother drawing the top border because it's out of the text's bounding box, right? So, how do I fix this so it works in IE? I've posted a sample page with the problem he http://aaron.verge-rpg.com/vergebrd/test.html Any help would be appreciated. Hi I'm currently testing my code within the firefox browser and have found that no borders appear whatsoever. I was using the dotted border however changed it to solid to see if that made a difference however this did not help. The css I use for the <div> is as follows: Code: .div_surround { width:185px; min-height:200px; float:left; margin-top:5px; margin-right:5px; border-bottom-style: solid; border-bottom-color: #CCCCCC; border-left-style: solid; border-left-color: #CCCCCC; border:1px; } I know a lot of people dont like the width to be specific pixels however unless this makes a difference to my situation, please ignore this for the time being. I am looking to change it in the future. By the way this code works fine in IE where I see a box with a bottom and left border. Thanks in advance for any help. Billabang! Hi I am trying to setup a left border on my tabs here, no matter what combination I try I cannot get a left border exactly like the others without giving the wholebox a full border (dont want this!!) Look at the example below.. Code: /* TESTING TABBED BROWSERS*/ } .tabbed-box { width: 100%; background: #fff url(tabbed-body-bg.jpg) repeat-x bottom; /*border: 1px solid #ddd; border-bottom:none; border-left:none; border-right:none;} */} .tabbed-box .tabs li { list-style: none; float: left; } .tabbed-box .tabs li a { display: block; width: 100px; padding: 5px 0; font-weight: bold; text-align: center; text-decoration: none; color: #888; background: #fff url(tabbed-tab-bg.jpg) repeat-x bottom; border-left: 1px solid #ddd; border-bottom: 1px solid #ddd;} .tabbed-box .tabs li:first-child a { border-left: 1px solid #ddd; } .tabbed-box .tabs li a:hover { color: #333; } .tabbed-box .tabs li a:focus { outline: none; } .tabbed-box .tabs li a.active { background: #fff; color: #333; border-bottom: 1px solid #fff; border-left: 1px solid #ddd; margin-left: 5px; } .tabbed-content { padding: 3em 1em 1em 1em; display: none; } Screen Shot Here (not aloud to post URLS) --- >freeimagehosting.net/uploads/4e9d9acdf7.jpg Any help much appreciated!! how can i use: css Code: Original - css Code .t {background: url(../images/dot.gif) 0 0 repeat-x; width: 20em; width:80%; left:50%; margin:20px; } .b {background: url(../images/dot.gif) 0 100% repeat-x} .l {background: url(../images/dot.gif) 0 0 repeat-y} .r {background: url(../images/dot.gif) 100% 0 repeat-y} .bl {background: url(../images/bl.gif) 0 100% no-repeat} .br {background: url(../images/br.gif) 100% 100% no-repeat} .tl {background: url(../images/tl.gif) 0 0 no-repeat} .tr {background: url(../images/tr.gif) 100% 0 no-repeat; padding:5px; } .t-exif {background: url(../images/dot.gif) 0 0 repeat-x; width: 20em; width:200px; right:0px;} .b-exif {background: url(../images/dot.gif) 0 100% repeat-x} .l-exif {background: url(../images/dot.gif) 0 0 repeat-y} .r-exif {background: url(../images/dot.gif) 100% 0 repeat-y} .bl-exif {background: url(../images/bl.gif) 0 100% no-repeat} .br-exif {background: url(../images/br.gif) 100% 100% no-repeat} .tl-exif {background: url(../images/tl.gif) 0 0 no-repeat} .tr-exif {background: url(../images/tr.gif) 100% 0 no-repeat; padding:10px; } .t {background: url(../images/dot.gif) 0 0 repeat-x; width: 20em; width:80%; left:50%; margin:20px; } to make my exif info box appear on the right of the image? i have tried using right:0px but it doesn't work, any ideas? current display page I have a page and it's a massive mess of nested tables and abs-positioned divs. Amongst these are two that become visible/invisible on the onclick of a checkbox. They start out with display:none inline. Still with me? There arent any floating elements in use, and pretty much everything has a width and height specified, so if there's some hasLayout freakyness going on i'd love to know what. Anyway, in IE7 when you click said checkboxes their target divs and thier contents appear correctly - but the divs' borders are missing, re-toggling the checkbox off and on again shows the border and then again for any subsequent re-showing. it's just the initial setting of display:'' I can't post the code but it looks something ten times freakier than the attatched recreation attempt, unfortunately i can't rectreate it, but you'll get the idea. Can anyone help? I'm going to try running some javascript after the page has loaded to do a quick double toggle to simulate the first no-border instance! I am learning CSS and wish to put a border around selected tables using the following code: table.sidebar { border: 2px black; padding: 50px } Something similar to this code was working OK earlier today, but now it won't. The cell padding command works, but other tags like border, width, etc., are not. I have tried disabling all other table styles in the CSS. Any ideas? I am using MS FrontPage 2002. Also, whys is it that when I apply a style to a table, like the one above, FrontPage puts in the following HTML code: <table class="sidebar" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0"> If I go to remove it to <table class="sidebar"> all of the formatting is lost. Seems like this is defeating the whole purpose of CSS Thanks, Keith Hey, searched so don't give me crap. I have 2 images, searchleft.jpg (looks like { ) and searchright.jpg (looks like } ) I only posted the Doc type just incase, I validated my webpage(www.gameyin.com) and nothing that could hurt this has happened. Anyway I want the rounded borders on the left center, for searchleft.jpg and a roundedborder for searchright.jpg on the right center. I hope I have been very clear. All the searches need 4 images...anyway... PHP Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <style type="text/css"> html { height: 100%; overflow: scroll; } body { font-family: tahoma, arial, sans-serif; font-size: 11px; background: #DEDEBA; margin: 0px 0px 0px 0px; color: #DEDEBA; } input, option, select, textarea { font-family: verdana, tahoma, arial, sans-serif; font-size: 11px; } .search { margin: 0px; padding: 5px 5px 5px 7px; width: 366px; height: 24px; float: right; } .input-search { width: 259px; margin: 0px 5px 0px 0px; padding: 5px; background: #DEDEBA; border-color: #666666; float: left; text-shadow: 808080; color: #808080; } </style> <script type="text/javascript" src="webfunctions.js"></script> </head> <body> <div class="search"> <form action="search.php" method="post" style="display:inline;"> <div> <input type="text" name="search" class="input-search" value="Enter your Search Query" onblur="if(this.value=='') this.value='Enter your Search Query';" onfocus="if(this.value=='Enter your Search Query') this.value='';" /> <input type="image" src="images/search.gif" /></div> </form> </div> I have a bit of CSS that wraps a border around an image, it works in IE but not in FF. What am I doing wrong? Code: .book_box { width: 95%; padding: 10px 5px 5px 5px; border: 2px solid white; background-color: #eef7ff; text-align : left; overflow: auto; } .book_box_img { float: left; margin: 5px; border: 1px; border-color: #003366; } I need to have a div element with borders that use background image as border corner background. div must be able to expand in height and width automatically. How can I achieve this? Basically on this page http://forum.prxa.info/profile.php?info=1&pageno=2 At the bottom the pagination boxes seem to have extra borders around them? Should look more like http://forum.prxa.info/popular.php with seperate boxes! I have a small table that is not displaying borders in IE. On this page The section with Financial Aid and Parents should have a grey 3px border on the right hand side going from the header image to the person at the bottom. In FF it displays as intended. HTML Code: <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td id="finaid" class="finaid greybrdr"></td> <td id="parents" class="greybrdr"></td> <td id="students" class="students"></td> </tr> <tr> <td class="bod finaid greybrdr"></td> <td class="bod greybrdr"></td> <td class="bod students"></td> </tr> <tr> <td id="finback" class="greybrdr"></td> <td id="parback" class="greybrdr"></td> <td id="studback"></td> CSS Code: .greybrdr { border-right: 3px solid #e4e4e4; } .finaid { border-left: 2px solid white; } .students { border-right: 5px solid white; } .bod { width: 183px; height: 200px; background-color: #FFFFFF; } |