CSS - Empty Cell Borders In Ie
I'm working on some sortable data tables. I have designed the CSS so the columns look raised and the cells are outlined. The problem is that empty table cells are not outlined in IE.
I can fix this by doing a border-collapse, but then I lose the raised look of the headings. I can also fix this by adding a non-breaking space in the individual cells, but the developers tell me that they don't want to add the code to check whether there is data or not and then fill the empty cell with a non-breaking space. So, I'm hoping there's some CSS trick I can use to force IE to outline the empty table cells. Anyone know of any? The attachment shows the look with the empty cells. Similar TutorialsI have a table that is populated using Spry. For some of the users, the table is showing its' borders in white when there is no data in the cell and for other users (like me) it's showing its' borders in black like expected. This is occurring in IE8 for the user. I have IE8 as well. Here is a setup of my table Code: <div id="Content"> <p class='instructions'>Click a column header to sort the table.</p> <div spry:region="jdmba"> <div spry:state="loading" class="loading">Please wait while alumni data loads…</div> <table class="spry" cellspacing="0" cellpadding="0"> <tr> <th scope="col" width="108px" class="sortable" spry:sort="last" id="last">Last Name</th> <th scope="col" width="106px" class="sortable" spry:sort="first" id="first">First Name</th> <th scope="col" width="269px" class="sortable" spry:sort="account" id="account">Company</th> <th scope="col" width="66px" class="sortable" spry:sort="state" id="state">State</th> <th scope="col" width="82px" class="sortable" spry:sort="hls_year" id="hls_year">JD</th> <th scope="col" width="82px" class="sortable" spry:sort="hbs_year" id="hbs_year">MBA</th> </tr> </table> <div class="Overload"> <table class="spry" cellspacing="0" cellpadding="0"> <tr spry:repeat="jdmba" spry:setrow="jdmba" spry:odd="odd" spry:even="even" spry:hover="hover" > <td width="108px">{last}</td> <td width="106px">{first}</td> <td width="269px">{account}</td> <td width="66px">{state}</td> <td width="82px">{hls_year}</td> <td width="82px">{hbs_year}</td> </tr> </table> </div> </div> Here is my CSS file Code: a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; } #News a:link { color: #00F; } #News a:hover { color: #00F; text-decoration: underline; } body { background: #000 repeat; } #wrap { background: #000; width: 900px; border: thick solid #9C0029; float: left; height: auto; padding: 0px 0px 1em; margin-top: 2%; margin-left: 10%; } #footer { font: bold small/50px Arial, Helvetica, sans-serif; color: #FFF; background: #9C0029; text-align: center; height: 50px; width: 850px; margin-left: 25px; } #Header { background: #8F001C url(../images/banner.jpg) no-repeat center center; width: 850px; height: 150px; margin-top: 20px; margin-right: 20px; margin-left: 25px; } h1 { font: normal 18px Arial, Helvetica, sans-serif; color: #000; text-align: left; } h2 { font: small Georgia, "Times New Roman", Times, serif; color: #333; text-align: justify; } h3 { font: normal medium "Times New Roman", Times, serif; color: #FFF; } h4 { font-size: small; color: #333; text-align: left; } .banners { background: #FFF0B2; width: auto; height: auto; font: 18px Arial, Helvetica, sans-serif; padding-top: .5em; padding-bottom: .5em; text-indent: 10px; } .Content { font: 14px/normal Georgia, "Times New Roman", Times, serif; text-align: justify; display: block; padding: 2em 3em 3em; } .Content a:link { color: #00F; } .Content a:hover { color: #00F; text-decoration: underline; } .Content a:visited { color: #00F; } #inner_body { background: #FFF; height: auto; width: 800px; margin-top: 0px; margin-left: 50px; padding-top: 0.5em; padding-bottom: .5em; } #inner_border { margin: 0em auto auto; border: thin solid #8E887C; width: 775px; padding: 1em 0em 0em; } #nav_bar { height: 3em; width: 100%; margin-left: 0%; text-align: center; } #Content { height: auto; width: 95%; padding: 0em 0% 5em; margin: 2.5% 2.55% 2%; text-align: left; font-family: Verdana; } #nav { height: auto; width: 20em; } #News { margin-left: 2px; height: 30%; background: #FFF0B2; padding: 3%; } #News a:visited { color: #00F; } .Overload { height: 208px; overflow: auto; } .odd { background-color: #E8E8E8; } .even { background-color: #E8E8E8;} .hover { background-color: #FFC;} table.spry { font-family: Verdana; font-size: 12px; line-height:20px; cursor: pointer; } .instructions { font-family: Verdana; font-weight:bold; font-size: 12px; line-height:20px; cursor: pointer; margin-bottom:8px; } .loading { font-family: Verdana; font-weight:bold; font-size: 12px; line-height:20px; cursor: pointer; margin-top:0px; margin-bottom:8px; color:#900; } table.spry th { border-left: 1px solid #000000; border-bottom: 1px solid #000000; border-top: 1px solid #000000; font-family:Verdana; padding: 0px; margin: 0px; } table.spry td { border-left: 1px solid #000000; border-bottom: 1px solid #000000; font-family:Verdana; padding: 0px; margin: 0px; } table.spry th.sortable:hover { cursor: pointer; } table.spry th.sortable { text-align:left; color:#FFFFFF; background: #8F001C url(../SpryAssets/bg.gif) no-repeat 95% 6px; } table.spry th.ascending { background: #8F001C url(../SpryAssets/SpryMenuBarUpHover.gif) no-repeat 95% 8px; } table.spry th.descending { background: #8F001C url(../SpryAssets/SpryMenuBarDownHover.gif) no-repeat 95% 8px; } I'm only placing borders on the left and bottom so that in my detail cells the borders aren't doubled up. So for example when I have no data for the cell State, the left and bottom border of that cell is white rather than black. Any ideas? Thanks! How do i apply visible and formated border to a certain cells without afecting the entire column or row? Im using the border properties like: border-buttom-style border-top-style border-left-style border-right-style border-width border-color etc, etc, but when apply the style the colum or the row is affected entirely, this makes my top sliced image (header) with the separators visible. Im new to css and need some help in doing this. Thx Hi, I have a HTML page linking to a CSS file in the header. My main table is defined using class="formBody". This includes: Code: table.formBody td { border-width: 1px 1px 1px 1px; padding: 5px 5px 5px 5px; border-style: solid solid solid solid; border-color: black black black black; background-color: white; -moz-border-radius: 0px 0px 0px 0px; } I need to override this on certain cells, so that a SINGLE certain cell will not have any borders (these will be cells on the bottom row, so the table will have the appearance of having half of its' actual width on the bottom row). Any ideas? I tried explicitly setting border="0" in the <td> tag and also defining a new class called "noborder" with border set to none, and then using <td class="noborder"> but neither of these work. essentially, what I want, is a table that looks like: Code: ________________________ | | | | ------------------------ |________| Any suggestions on how to do this? currently i have links defined as a certain color and changes to a certain color when i hover over them.. i have a table which has these links inside the cells and when i hover over the cell, the background of the cell changes color but the link wont change color until i hover over the link.. is there anyway so that when i hover over the cell i can make the link change color too? the problem is i have some padding for the cells, so once i go inside the cell but dont hover exactly over the link, the background will change but the link won't until i hover over it thanks I'm having some problems with CSS. If you look at the pictures below, the first is a screenshot of what it is supposed to look like. It's how it looks in most browsers. The second one, however, is how it looks in IE 6 on Windows and IE 5 on the Mac. It is wrong. Correct look Incorrect look I want to know how to fix this. The little colored boxes are supposed to be squares and have solid borders on them. The shape is off and the borders are missing on the IE version. Also, on the progress bar, there is not supposed to be space between the cells but there is. There is also space between every cell on the page and there is not supposed to be any. Here is my main CSS: Code: body { background-color: #FFFFFF; } a { text-decoration: none; font-weight: bold; } a:link { color: #003366; background-color: transparent; } a:visited { color: #003300; background-color: transparent; } a:active { color: #339933; background-color: transparent; } a:hover { text-decoration: underline; } table { border: 1px solid black; border-collapse: separate; border-spacing: 0px;} td, th { border: 0px solid black; padding: 5px; text-align: center; white-space: nowrap; } tr.one { background-color: #FFFFFF; } tr.two { background-color: #DDDDDD; } table.squares { border: 0px; border-spacing: 1px; width: 50px; height: 10px; } td.square { border: 1px solid grey; padding: 4px; } td.nopadding { padding: 0px; } .default { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 10px; color: #000000; } .h1 { font-size: 200%; font-weight: bold; text-align: center;} .h2 { font-size: 120%; font-weight: bold; } .h3 { font-weight: bold; } .step { font-size: 150%; font-weight: bold; color: #999999; } Here is one of the sets of squares: Code: <table class="squares"> <tr> <td class="square" style="background-color: #CCCC66"></td> <td class="square" style="background-color: #CC9966"></td> <td class="square" style="background-color: #990000; border: black"><td> <td class="square" style="background-color: #669966"></td> <td class="square" style="background-color: #669999"></td> </tr> </table> And finally, here is one of my progress bars: Code: <table style="color: white; width: 100px"> <tr> <td style="padding:0px; text-align: right; padding-right: 5px; background-color:#222244; width:41px"></td> <td style="padding:0px; text-align: left; padding-left: 5px; background-color:#666666; width:59px">40.7%</td> </tr> </table> And in case that code is not enough, here is a link to the full HTML. According to this CSS test my CSS is not wrong. So does IE just suck? Is there something I can do to make it work in all browsers? My last question is, should I be using div tags for my boxes and progress bars instead of tables? I couldn't figure out how to make them work with divs so I just went with what I knew. Could someone give me an example of each using divs so I can learn how to make it work? Hi there! This might seem really basic but I don't seem to be able to remove the default border from a cell I created. The code looks like this: "<p> </p> <table align="center" style="margin-left: auto; margin-right: auto; border-width: 0px;"> <tbody> <tr> <td> <div style="overflow: auto; height: 475px; width: 700px; border-style: hidden;"> <p align="center"> <img height="457" width="600" src="images/stories/vlkommen3.jpg" alt="vlkommen3" style="margin: 0px; vertical-align: middle;" /> </p> <p align="center"> </p> <p> </p> </div> </td> </tr> </tbody> </table> <p> </p> How shall I do to hide the border? Thanks in advance! /Kristoffer 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? 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;} 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> 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? 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 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> Hi, Im not sure what the problem is with my code, but it gives me full borders when I ask for only top and bottom. Here is my CSS. css Code: Original - css Code .logo{ width: 100%; border: 1px solid #FFFFFF; font-size: 32px; } .menu{ width: 150px; height: 320px; border: 1px solid #FFFFFF; text-align: left; } a.menu{ border-top: 1px solid #FFFFFF; border-bottom: 1px solid #FFFFFF; color: #FFFFFF; width: 100%; } .logo{ Here is my html of that part. html Code: Original - html Code <span style="float: left"> <div class="menu"> <a href="" class="menu">asdf</a><br /> <a href="" class="menu">asdf</a><br /> <span style="float: left"> <div class="menu"> <a href="" class="menu">asdf</a><br /> <a href="" class="menu">asdf</a><br /> Here is what it outputs. http://blacknine.net/test.html q) In CSS or html, how can make my buttons and borders around a screen section ( created with css) have roundish borders and regular not corners q) How can i get the colors of such buttons to be a bit more exciting eg go from ligh to dark blue instead 1 uniform color? 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 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! 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> 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 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? While styling table I would like to have black row border all the way, but currently cell borders (grey) overlay them (1px, but still) - like in the image: Bellow is my css. What do I change? Thanks. Code: .list_f { padding: 0px; margin: 0px; border-width: 1px; border-style: solid; border-color: #F1EFE2; border-collapse: collapse; empty-cells: show; border-top: 0px; border-bottom: 0px; border-left: 0px; border-right: 0px; } .list_f th { text-decoration:none; font-weight:normal; background-color:#F3F3F3; margin: 0px; padding: 2px; /* text-align: left;*/ vertical-align:middle; height:22px; border-collapse: collapse; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #000000; border-right-color: #CCCCCC; border-bottom-color: #000000; border-left-color: #CCCCCC; } .list_f td { margin: 0px; padding: 2px; border-collapse: collapse; vertical-align:middle; height:22px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #000000; border-right-color: #EBEBEB; border-bottom-color: #000000; border-left-color: #EBEBEB; } .list_f tr { border-top-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-bottom-style: solid; border-top-color: #000000; border-bottom-color: #000000; } |