CSS - Is Css Able To Ignore A Cell With A Certain Id But Apply To The Other Cells
i have a table with several header columns:
Code: <table> <tr><th>header 1</th><th>header 2</th><th>header 3</th></tr> <tr><td colspan=3>empty info</td></tr> </table> now i want to put a border inbetween the cells, to do this i simply used: Code: table th { border-left:1px solid black; } except this adds a border to the left hand side of the far left cell, making the table border of 1px actually 2px if i give that end cell an id can it be ignored when applying the left border? or would i have to add the lines: Code: table th#idname { border-left:0px; } Similar Tutorialscurrently 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 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! 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 Hi, I have changed my test site so I can display an ad and so that each section is separated into different sections, anyway after changing a few things and fixing a few problems I have found that the problem is happening with my #ContentMain except I have no idea how to fix it. Essentially #ContentMain is appearing before it should be (ignoring the formating and appearing behind everything) when it should be appearing directly after <div id="main1"> everything I have tried, I have had no success with. Also as I have separated the gap I had between the top links and the main picture to add in in ad section (no actual css setting for it as everything I have tried hasn't worked) Where as before my editing the content appeared where it was meant to, so any help would be greatly appreciated and if you need me to explain something in more detail let me know. TorqueSRO - Click Me Am I commenting lines incorrectly? If I prefix a line with two slashes // in the CSS, firefox will ignore it. IE will recognize it and perform the CSS styling. For instance: Code: table.myTable tr td { background-color: red; //background-image: url('mypic.jpg'); } The TD element will not have a background in firefox. It WILL have the background image in IE. P.S. I am using IE8 on Win7 RC1 (build 7100). Thank you Hello, I have a page with the left margin set to 100. How can I use CSS to make a table have a left margin of 0. I need everything else to be @ left margin 100. So I want to totally ignore the left margin setting only for this table. Two questions: 1, I tried using min-width and it doesnt work with block level elements unless I float them or use position: absolute. What is the correct way to set the width on a block level elements? 2, Now FF also implements: word-wrap: break-word, so thats very good news. However I cant get it to ignore a minimum width. Ie I dont want a div with a min-width containing text to expand when the word-wrap is set and the text is too long. I only want it to expand when other items that are larger then the min-width are put in the div not when text is put in the div. thanks Sorry for the slightly ambidgious title, hard to explain my issue. Two clips of code below, the div "test" relates to an Rss feed i'm pulling in through the javascript below. A class is automatically applied to the RSS when it loads. However, it is being displayed as a bullet list despite the stylesheet having no reference to a bulleted list. It seems to be due to the fact it sits within a <li> class. But is there a way to tell it to ignore any style in above classes? Aim being so it loads without being in a bulleted list. Code: <ul id="column3" class="column"> <li class="widget color-orange"> <div class="widget-head"> <h3>Widget title</h3> </div> <div class="widget-content"> <div id="test"></div> </div> </li> Code: <script type="text/javascript"> $(document).ready(function () { $('#test').rssfeed('http://www.fmuforum.com/index.php?app=core&module=global§ion=rss&type=forums&id=2', { limit: 5 }); }); </script> Thanks in advance Hi I'm building a selectbox insead of using the common select tag. I use the windows.createpopup() method to display the list of choise. Differently to the div object the popup object is like a new window so it doesn't inherit the css style sheet I've attached to the main window. I tought to attach it by using the addImport(url) method of the styleSheet object but it doesn't seem to work. Here it's my code, the show function it's called when the selectbox expands: var Select_box = window.createPopup(); Select_box.document.styleSheets[0].addImport("URL('common/css/default_style.css');") function show(element) { if (Select_box.isOpen==false) { Select_box.document.body.innerHTML = Select_box_content.innerHTML; Select_box.document.body.className='selectbox'; Select_box.show(0, 18, 150, 50, element); } else { Select_box.hide(); } } I've noticed that using the addImport method on the main window, and not on the instance of the select_box, with 0 index of the styleSheet the error doesn't occur but it doesn't also change the proprety. Tring using any other index value it gives me the usual error. So how can I attach a style sheet to a popup created with the window.createpopup()? Thank you Hi there. I am looking through a style sheet from a site and was just wondering what this line would apply to: Code: submit { font-size: 10px; border: thin #A9D5F5 solid; background-color: #395980; color: #FFFFFF; font-family: Arial, Helvetica, sans-serif; letter-spacing: 0px; word-spacing: 1pt; } I guessed submit buttons but it's nothing to do with them. Thanks Colin Hey Guys, I'm trying to apply a style to all the TD's within a class of TR's. I am having trouble making the changes apply to the TD not the TR. How can I do it? Thanks! Is there a way to use CSS to apply "no" style to something? I know it's strange... I'll explain. I have a general style for all the forms on my website but there is one form I want to appear as the standard default looking form. I don't want to assign an id or anything to the styled forms because then I would have to go back and edit every single page... I'd much rather do something to the 1 form to make it look like the browser default. Is there a way to exclude something from taking on a general style? Any help is appreciated! Thanks! hi friends, i have a table with two columns.I have a designed td in stylesheet but it is not take effect.In the normal design view,style is effected but when runtime the changes will not take effect. And also if apply css "class" for td it wont accept instead it accept only property which are given in in style property i.e <td style="bgcolor:blue......"> My CSS is... Code: .left_column { background-color:#d29b28; width:2000px; } .content { background-color:#cccccc; vertical-align:top; padding-top:10px; padding-left:10px; line-height:5pt; font-family:Tahoma; } .caption { background-color:Black; color:White; } div.content { background-color:Lime; float:left; text-align:left; font-size:20px; line-height:3px; font-family: Arial, Helvetica, sans-serif,Tahoma; } and my Source Code is...(Which is not take effect) Code: <td class="left_column"> .............................................. </td> <td class="content"> <div class="content"><%# Server.HtmlEncode(Eval("question").ToString())%></div> </td> If i give the above code <tr> is divided into two <td> with equal width. This code only take effect... Code: <td width="200" style="background-color:#d29b28;border-style:solid; border-right-color:Black; border-width:1px; min-height:250px;"> ........................... </td> <td class="content"> <div class="content"> <%#Server.HtmlEncode(Eval("question").ToString())%> </div> </td> what can i do for that...I'm designing in Master Page.. Hi, I'm working on my first standards compliant site, so I'm a bit of a novice with the CSS required. You can view a test page I have set up at: 67.207.72.2/test_styles.htm (forum rules won't let me include this as a url) The css file for this page is at: 67.207.72.2/css/test_styles.css My issue is that the right column stops short- I'd like the background color to continue down the length of the page. To try to do this, I set the wrapping div on this section (#main_content) of the page with the appropriate background-color. IE displays the page the way I want it to appear, but FF, Safari, and Chrome all do not. I know this means I'm doing it wrong, but I don't know what to change. I've also tried using an image for a background for the #main_content div, and to set a height: 100% property for the column, but neither of those worked. Can anyone point me in the right direction? Thanks for your time. can I apply more than one style to an element? Or do they overwrite each other? thanks Hi! In this page [www].bezlica.ru/chat/sample.php , left bottom flash window is 3 pixels up of its normal position. In Firefox it renders well. Is there any way to fix in IE, while not affecting Firefox? Hi all.. I been tried to put page break function inside <div> tag but it still can't take any effect. Am i correct or any others idea? And when i put in page break function and want to print page 2, but it'll also print out some page 1 table field. |