CSS - Border Types Not Working In Ie
I have a style that I want to use, but it only seems to work in mozilla browsers. I have looked around on the internet but can't find any simular posts.
Here is what I have: Code: <div class="border1" style="width: 150px;"> <div class="title"> title </div> <div class="content"> <a href="#">test</a> <a href="#">test</a> <a href="#">test</a> </div> </div> and the styles Code: body { font-size: 12px; font-family:Verdana, Arial, Helvetica, sans-serif; } .border1 { border: 1px solid #666; border-color: #999; margin: 5px; } .title { border: 1px outset #999; background-color:#4D77A8; padding: 2px 5px; color: white; } .content { border: 1px outset #999; background-color:#F9F9F9; padding: 5px; } .content a{ text-decoration: none; padding: 2px 3px; display: block; color: #333333; } .content a:hover{ border: 1px solid #333; background-color: #84A1C3; padding: 1px 2px; color: white; } in IE the only border style that seems to work is "solid". If anyone can help I would appreciate it. Thx Similar TutorialsThis is driving me nuts! I have done everything I think that they says I should do but it is not working...here is the table style I am using if I use normal border styles it works ok...please can someone tell me where I am going wrong...thank you! .nik { background-color: #FFEAA1; padding-left: 1em; padding-right: 1em; border-image: url(border.png) 0% 30% 0% 30% repeat; } oh and the image size is 100px x 100px Kriss Hi I have a horizontal menu made from a list. On hovering over the links its supposed to show a yellow bottom border 3px underneath. Works perfectly in everything but IE7. Any ideas please. I really don't think this is possible, but I'll ask anyways, can I have position fixed for the horizontal alignment of an element, but position absolute for its vertical alignment? when using unordered lists, is there any way to get more than 3 different bullet designs as you go into deeper nests? after the 3rd nest, the same bullet design is used over and over again. 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 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! How do you create an inner border around a table in css, rather than a "solid" border which creates a border line around the table on the outer half. The border needs to butt up against an image, rather than leaving a pixel space. This is the coder I have so far. Nothing big: Code: .solid { border: solid 1px #000000; } Thanks. Hey on my website: http://www.chamillionairechat.com I want there to be a border around the mainmenu and to look something like this: And this is the css i'm using for the mainmenu: Code: .mainmenu { background-color:#FFFFFF; padding-bottom:5px; border:1px border-color:#21511F; } So does anyone know what i'm doing wrong Thanks Hi, I'm a total newbie when it comes to .. well everything. HTML, CSS etc ... I'm working on a little site, but I have a problem on (apparantly I can't post the link to my site because I'm a new user.. ) In Firefox everything is OK. But in IE when I hover over the bottom Div's (delphi.exe file) and (Delphi-files) I get a solid border instead of a dashed border as I wrote down in the CSS. Any idea what the problem is? Is it needed for me to post the CSS file? Might be a little bit embarrasing as it's probably the most rediculous CSS file you've ever seen. Thank you for your time. Hi guys. Can I change a table row border style like below?? Code: <tr style="border-bottom: solid 1px #DBDBDC";> OK, I'm doing the ALA trick where you construct a menu from an unordered list and its list items. Very watered down example here but suppose my menu consists of a horizontal row of text links, with each link separated by a vertical line. In my CSS I am giving the <li> container a right border that is 1px thick and black. This creates the vertical line for each link. The problem here is that the last link in the menu should not have a vertical line following it. I thought this would be an easy fix - I created a style that rendered no borders and called it via the class attribute of the <li>. Unfortunately, this dis not make the border disappear for the last menu item. All other properties defined in that style are rendered properly but the border property set in the <li> will not be overridden. Here's some code: Code: #bdrtest ul { margin: 0; padding: 0; list-style: none; } #bdrtest li { float: left; padding: 0; margin: 0; border-right: 1px solid #000; } #bdrtest li a { padding: 2px 10px; } .noborder { border: 0; } and Code: <div id="bdrtest"> <ul> <li><a href="#">hello</a></li> <li class="noborder"><a href="#">world</a></li> </ul> </div> Now, if I use an inline style to remove the border, it displays as expected: Code: <li style="border: 0;"><a href="#">world</a></li> It also displays as expected if I redefine the scope of my style: Code: #bdrtest li.noborder { border: 0; } I'd like to be able to use my .noborder style globally. Any idea as to what I'm doing wrong? I'm having trouble with image borders showing up in browsers- From my style sheet: img { border: #FFFF91; border-width: 5px; } It's weird- it works on my header image for each page, but not the rest of my images... I tried to post the link, but I just registered today and this is my first post, so I can't... Much, much thanks for any help! claytablet So here's my css code Code: #top-div { border-top : 10px solid #FF8F00; width:100%; position:relative; top:-8px; } The intention is suppose to make an orange strip across the top of the page. The problem is that the left and right border of the div is not orange - specifically the top-right, top-left borders are not orange. So basically the strip is not stretch 100% from the otter most left to the otter most right side. Any advice? Hi all currently trying to move away from a table based layout into a cleaner looking css layout with a problem. http://www.prxa.info/area51/viewtopic.php?tid=1 The top section is the css version, where as the bit below it is using tables. I am trying to get the "container" class to encompass the whole top bit which i am doing, but the border of it refuses to appear? This is the css bits html: Code: <div class="container"> <div class="topicoptions"> <div style="float: left; width: 17%"> <a href="viewtopic.php?tid={$post['topic_id']}" class="topicoptions">#{$this->post_count}</a> </div> <div style="float: right; width: 83%; text-align: right;"> {$this->mod_options} {$topic_options} </div> </div> <div style="float: left; width: 17%"> <div class="contentbox"> <div align="center"> {$avatar} {$lang['postedby']} {$profile_link} <br /> {$post_count}<br /> {$lang['postedon']}: {$date_time} </div><br /> </div> </div> <div style="float: right; width: 83%; text-align: left;;"> <div class="contentbox1"> {$post['text']} <br /> <br /> {$signature_finish} {$edited} </div> </div> </div> As you can see "container" covers all of it, and the css is simply a 1px border, i cannot see where i am going wrong. Hey everyone! So I'm trying to make a site. I'm not using any tables, and I want to have a border for each side of the page. I can't use a background because the page changes width based on the users browser width. My CSS and HTML are verified. Anyways, for the right and left borders, this is the code I have: HTML: Code: <!-- Border --> <div id="left_border"></div> <div id="right_border"></div> <div id="left_border_top"></div> <div id="right_border_top"></div> <!-- End Border --> and for the CSS I have this: Code: /*Site Border Full*/ #right_border{ background-image: url(img/layout/site_right_border.jpg); background-repeat: repeat-y; width: 3px; height: 100%; float: right; position: absolute; right: -3px; } #left_border{ background-color: #94aec5; width: 1px; height: 100%; float: left; position: absolute; left: -1px; } #right_border_top{ background-image: url(img/layout/header_right_border.jpg); background-repeat: repeat-y; width: 3px; height: 74px; float: right; position: absolute; right: -3px; z-index: 1000; } #left_border_top{ background-color: #496986; width: 1px; height: 74px; float: left; position: absolute; left: -1px; z-index: 1000; } /*End Site Border Full*/ Here's the results I'm getting in Firefox: As you can see the border displays until you get to the content area (with the text below). It seems to be because for the content area, I set the height to 100%. When I change that to a definite number (ie. 300px) the border displays. And here's how it displays in Internet Explorer 7: There's no border at all on this one! Here's my entire code for the site: HTML: 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=utf-8" /> <title>Site Beta</title> <style type="text/css"> <!-- @import url("layout.css"); --> </style> </head> <body> <div id="container"> <!-- Site Head --> <div id="header"> <div id="banner"></div> <div id="header_user"> <div id="head_user_container"> <div id="head_avatar"><img src="img/layout/avatar_test.jpg" alt="User Avatar" /></div> <div id="head_user_info">Welcome <a href="">Mike Jensen The Awesome Man </a>(<a href="">Sign Out</a>)<br /><a href="">Edit Profile</a><br /><a href="">Message Center</a></div> <div id="head_user_end"></div> </div> </div> </div> <!-- End Site Head --> <!-- Border --> <div id="left_border"></div> <div id="right_border"></div> <div id="left_border_top"></div> <div id="right_border_top"></div> <!-- End Border --> <!-- Menu --> <div id="menu"> </div> <!-- End Menu --> <!-- Start Top Ad Banner --> <div id="top_ad"> </div> <!-- End Top Ad Banner --> <!-- Main Content Container --> <div id="main_content_container"> <div id="main_content">woo hoo</div> <div id="right_content">right poop</div> </div> <!-- End Main Content Container --> </div> </body> </html> and CSS: Code: /*Basic Elements*/ body { font-family: "trebuchet MS", calibri, verdana, arial, sans-serif; font-size: 13px; color: #303030; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 0 20px; background-color: #d8d8d8; } p { margin-top: 10px; text-align: justify; font-family: "trebuchet MS", calibri, verdana, arial, sans-serif; font-size: 13pt; line-height: 10pt; } a:link { text-decoration: underline; color: #417cb3; } a:visited { text-decoration: underline; color: #417cb3; } a:hover, a:active { text-decoration: underline; color: #5e9cd5; } acronym { font-weight: bold; border-bottom: 1px dotted #417cb3; } /*Specific DIVs*/ #container { margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; padding: 0px; max-width: 1200px; min-width: 950px; text-align: left; position: relative; background-color: #d8d8d8; } /*- Banner -*/ #header{ background-color: #417cb3; height: 74px; width: 100%; clear: both; float: left; } #banner{ background-image: url(img/layout/banner.jpg); background-repeat: no-repeat; float: left; width: 284px; height: 74px; } #header_user{ height: 66px; float:right; position: relative; margin-top: 4px; margin-right: 7px; } #header_right_border{ width: 3px; height: 74px; background-image: url(img/layout/header_right_border.jpg); background-repeat: repeat-y; float: right; position: absolute; right: 0px; } /*End Banner*/ /*Head User Info*/ #head_user_container{ clear: both; height: 66px; position: relative; } #head_avatar{ background-image: url(img/layout/ban_avatar_bg.jpg); height: 66px; width: 64px; float: left; background-repeat: no-repeat; padding-top: 1px; padding-left: 1px; } #head_user_info { background-image: url(img/layout/logged_info_bg.jpg); background-repeat: repeat-x; min-width: 225px; max-width: 500px; float: left; height: 66px; margin-left: -1px; font-family: "trebuchet MS", calibri, verdana, arial, sans-serif; font-size: 13px; color: #FFFFFF; padding-top: 4px; padding-right: 3px; padding-bottom: 0px; padding-left: 5px; } #head_user_info a:link { text-decoration: none; color: #5dbdfa; } #head_user_info a:visited { text-decoration: none; color: #5dbdfa; } #head_user_info a:hover, a:active { text-decoration: none; color: #7fc9f8; } #head_user_end { float: left; background-image: url(img/layout/logged_info_end.jpg); background-repeat: no-repeat; height: 66px; width: 3px; } /*End Head User Info*/ /*Site Border Full*/ #right_border{ background-image: url(img/layout/site_right_border.jpg); background-repeat: repeat-y; width: 3px; height: 100%; float: right; position: absolute; right: -3px; } #left_border{ background-color: #94aec5; width: 1px; height: 100%; float: left; position: absolute; left: -1px; } #right_border_top{ background-image: url(img/layout/header_right_border.jpg); background-repeat: repeat-y; width: 3px; height: 74px; float: right; position: absolute; right: -3px; z-index: 1000; } #left_border_top{ background-color: #496986; width: 1px; height: 74px; float: left; position: absolute; left: -1px; z-index: 1000; } /*End Site Border Full*/ /*Menu*/ #menu{ background-color: #417cb3; background-image: url(img/layout/menu_bg.jpg); background-repeat: repeat-x; height: 34px; width: 100%; clear: both; } /*End Menu*/ /* Top Ad Banner*/ #top_ad{ background-color: #ededed; height: 109px; width: 100%; clear: both; max-width: 1204px; clear: both; } /*End Top Ad Banner*/ /* Main Content */ #main_content_container{ background-color: #ffffff; background-repeat: repeat-x; height: 100%; width: 100%; clear: both; } #main_content{ background-color: #cbe5ea; float: left; width: 77%; height: 100%; clear: both; } #right_content{ background-color: #b6c984; float: right; width: 23%; height: 100%; clear: right; } /* End Main Content */ /* Border Pull */ #border_pull{ height: 1px; width: 100%; clear: both; max-width: 1204px; clear: both; } /* End Border Pull */ So, is there any way for me to border the entire site with a 1 px border on the left side, and a y-repeating 3px image "border" on the right side? Any ideas would be GREATLY appreciated! If you need any more info than I've given you, please ask! Thanks guys! Mike Hi, I am trying to box around a text, but what happen is that when I setting up borders for it, it shows the box expand longer than the text. Is there a way to have the box just as big as the text (Well, slightly bigger, but just enough for the text)? I thought border-collapse:collapse would do it, but apperantly not. This is the CSS code I am using: PHP Code: div.submenu1 { position: relative; left: 22px; padding: 4px; border-style: solid; border-width: 0px 1px 1px 1px; border-color: #0000FF; border-collapse: collapse; background-color: #3399FF } And on the html it's: PHP Code: <div class='submenu1'> <a href='somelink' class='submenu1'>somelink</a> </div> Thanks for taking the time to read my question. I want to get rid of the right border on the last link but keep the borders on the rest of the <li>'s. I'm totally stuck. Thanks, Brad CSS: Code: #navcontainer ul { padding-left: 40px; margin-left: 0; background-color: #000000; color: #000000; float: left; width: 100%; font-family: arial, helvetica, sans-serif; } #navcontainer ul li { display: inline; } #navcontainer ul li a { padding: 0.2em 1em; background-color: #000000; color: #ffffff; text-decoration: none; float: left; border-right: 1px solid #fff; } #navcontainer ul li a:hover { background-color: #369; color: #fff; } li.LastOne a.ALastOne { color: red; } HTML: Code: <div id="navcontainer"> <ul id="navlist"> <!--<li id="active"><a href="#" id="current">Item one</a></li>--> <li><a href="#">Seminars</a></li> <li><a href="#">Stand-Up</a></li> <li><a href="#">Intro Psych</a></li> <li><a href="#">Selected Transcripts</a></li> <li><a href="#">Broadcast Archives</a></li> <li><a href="#">Pricing & Inquiries</a></li> <li class="LastOne"><a class="ALastOne" href="#">Links</a></li> </ul> </div> hi, i was wondering if it is possible to assign images for each border. something like border-top:5px dotted black; background-image:url(horBrdr.gif); border-left:1px solid red; background-image:url(verBrdr.gif); border-right: 2px groove green; background-image:url(horBrdr.gif); border-bottom:3px dotted #3399CC ; background-image:url(horBrdr.gif); vertical-align:middle; padding:1em;} of course this doesn't work. thanks for the help... |