CSS - Cell Bg Only Part The Way Accross
hi,
is it possible to have a bg in a cell only to go half way accross the cell? Similar TutorialsI haven't been able to find an answer to this anywhere and am hoping someone here can help. I'm trying to space the text inside my navigation div so that it stretches evenly accross the div rather than being centered and having a bunch of space on either side. Here's my current html... Code: <div id="navigation"> <p class="nav"><font color="#ffffff" face="verdana" size="3"> <img align="center" border="0" width="1" height="2" src="navdot.gif"><br /> Link 1 | Link 2 | Link 3 | Link 4 | Link 5 </font></p> </div> And my css... Code: #navigation { width:750px; height:30px; background-image:url('navigation.gif'); background-repeat:no-repeat; margin-top:0px; } Any help would be much appreciated. Thanks! EDIT: I think I got it figured out... well, it looks good on my end and I checked it across 6 larger browsers anyways. Here's the html now... Code: <div id="navigation"> <img align="center" border="0" width="1" height="2" src="navdot.gif"> <table align="center" border="0" width="750"> <tr><td width="150" valign="top"> <center><font color="#ffffff" face="verdana" size="3">Link 1</font></center> </td><td width="150" valign="top"> <center><font color="#ffffff" face="verdana" size="3">Link 2</font></center> </td><td width="150" valign="top"> <center><font color="#ffffff" face="verdana" size="3">Link 3</font></center> </td><td width="150" valign="top"> <center><font color="#ffffff" face="verdana" size="3">Link 4</font></center> </td><td width="150" valign="top"> <center><font color="#ffffff" face="verdana" size="3">Link 5</font></center> </td></tr></table> </div> I used a 1x2px image to lower the text so it wasn't sitting right up against the top of the div, then I used a table inside of it and text without using paragraph tags. There's gotta be a cleaner way of doing this though, isn't there? It looks great cross-browser, but I'm thinking there's gotta be a way to do this without a table. 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! 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 First of all, i'd like to thank Arnica who helped me with the first part of this post (CSS to table HELP). This is what Arnica helped me with befo (left corner image)(<== top back ==>)(right corner image) where <== and ==> represent streching horizontally in both directions. Now, i need help once again. I'd like to have side border images that strech vertically and while the body background image streching in all directions, vert and hor. Here's what i mean: (^ left border v)(<== body back ==>)( ^ right border v) where ^ and v mean streching vertically and <== and ==> mean streching horizontally. this is what i came up with so far: Code: <table width="100%" border="0" cellpadding="0" cellspacing="0"> <!--title bar--> <div style="margin: 0px; position: relative; float: left; width: auto; height: auto; "><img src="img_inside_article_title-bar_left.gif"></div> <div style="margin: 0px; position: relative; right: 6px; float: right; "><img src="img_inside_article_title-bar_right.gif"></div> <div style="margin-left: 7px; margin-right: 7px; height: 30px; width: auto; position: relative; left: -3px; background-image: url(tile_inside_article_titlebar_bak.gif); "> This is a test</div> <!--article--> <div style="position: relative; float: left; width: 10px; height: auto; background: url(images/layout/home_tech-images/tile_inside-window_left-border4.gif); " > </div> <div style="position: relative; width: 10px; float: right; right: 6px; background: url(images/layout/home_tech-images/tile_inside-window_right-border4.gif) right repeat-y; "> </div> <div style="margin-left: 10px; margin-right: 10px; height: 30px; width: auto; height: auto; position: relative; background: url(images/layout/home_tech-images/tile_back1.gif); "> This is a test<br>and again</div> </table> !!my appologies for the sloppy code, still learning!! In ie the above code works perfectly, the code under <!--article-->, where the borders strech in respect to the text in the center, but in firefox the sides strech for ever vertically!! HELP!!!!!!!!!!!! fz105 On two pages of my site: mileswright . com/?page_id=324 and mileswright . com/?page_id=331 it seems that part of the CSS file is being ignored. If you look at any of the other team members such as: mileswright . com/?page_id=334 you will see that the content div has padding being applied to it. In the first two pages though, the content div is being ignored. I'm really at a loss as to why this is happening. If anyone can shed some light on it I would be very grateful! (I apologize for the links not working but since I am a new poster I can't post links, but I figure that it would be pretty worthless if I didn't give links.) Thanks to Kravvitz I was able to get the first version of this system up and running, but I didn't like the plain tabs so I switched them out with tabs of my own and also a background image (instead of just a color) for the subnav bar. I am having trouble lining the tabs up though so they have 1 or 2 px spaces between them and the text is centered on them. (I'm trying to right align the tabs). Also in IE the on tab merges with the subnav bar as it should (so the gradiant looks seemless) but in Firefox it does not... The images are he http://yourthreshold.com/downloads/nav_background.gif http://yourthreshold.com/downloads/..._background.gif http://yourthreshold.com/downloads/..._background.gif The code: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title></title> <style type="text/css"> /* passes tests in Firefox, IE5.5+/Win, Netscape 6+, and Opera 7+ IE5.0/Win just isn't handling the z-indexes correctly. */ /* Menu */ body { color: #333; background-color: #fff; padding: 20px 0 0 20px; margin:0; font-size: 90%; } body,a,* { font-family: helvetica, arial, geneva, lucida, sans-serif; } h1 { font-size:1.5em; font-weight:normal; margin:1em 0; } ul#topnav { margin:1px 0 10px; padding: 0 0 0 12px; list-style-type: none; border: 0 none; position: relative; left:-50px; width: 55em; } /* \*/ * html body { font-size: 85%; } * html ul#topnav { left: 0; } /* */ @media screen and (min-width: 0px){ ul#topnav { left: -33px; } } #topnav li { display: block; margin: 0; padding: 0; float:right; } #topnav a { display:block; color:#444; text-decoration:none; background: url(images/nav_background.gif) no-repeat; margin:0; text-align: right; padding: 0.2em 36px 0.2em 3.4em; position: relative; font-weight: bold; top: 0; font-size: .8em; } #topnav li a.a0 { left: -3px; z-index: 151; } #topnav li a.a1 { left: -2px; z-index: 152; } #topnav li a.a2 { left: -1px; z-index: 153; } #topnav li a.a3 { left: 0px; z-index: 154; } #topnav a:hover { background: url(images/nav_background.gif) no-repeat; } ul#topnav li a.here { background: url(images/navHERE_background.gif) no-repeat; z-index: 310; } /*ul#topnav li a.here { z-index: 210; background: url(images/lia.gif) no-repeat; /*border-right: 1px solid #777; padding: 0.2em 10px 0.2em 3.4em; margin: 0 2px 0 0; }*/ ul#subnav { list-style-type: none; position:absolute; z-index:201; margin: -1px 0 0; right: 0; padding: 1px 30px 3px 0px; background:url(images/subnav_background.gif) repeat-x; border-top:1px solid #fff; width: 720px; height: 22px; min-height: 1.2em; } /* \*/ * html ul#subnav { width: 748px; wid\th: 730px; } /* */ #subnav li { position:relative; z-index:102; display: block; margin: 0; padding: 0; float:right; } #subnav a,#subnav a:hover,ul#topnav li #subnav li a.here { color:#fff; display:block; text-decoration:none; margin:0; padding: 2px 10px 2px 12px; background-color: transparent; background-image: none; border: 0 none; } #subnav a:hover,ul#topnav li #subnav li a.here { color:#444; } /*Structure*/ * { margin: 0; padding: 0; } body { margin:0; padding:0; text-align: center; /* IE5/Win fix */ } #wrapper { width:750px; height:100%; margin:0 auto 0 auto; border:1px solid green; text-align: left; } #top { width:750px; height:60px; } #logohead { width:370px; height:60px; border:1px solid blue; float:left; } #toplinks { height:60px; width:365px; border: 1px solid orange; margin-left:380px; } #nav{ width:750px; height:50px; /*border:1px solid pink;*/ } #midbanner { width:auto; height:170px; border:1px solid red; } #bottomcontent { width:auto; height:auto; border:1px solid #990; /*yellow;*/ } /* \*/ * html #bottomcontent,* html #midbanner { width:750.5px; wid\th:760px; } /* */ </style> </head> <body> <div id="wrapper"> <div id="top"> <div id="logohead">Logo Here</div> <div id="toplinks" align="right">Login Link Here</div> </div> <div id="nav"> <ul id="topnav"> <li><a class="a3" href="../fresh/about.htm">About</a></li> <li><a class="a2" href="#">Tools</a></li> <li><a class="a1" href="#">Hosting</a></li> <li><a class="a0 here" href="#">Home</a> <ul id="subnav"> <li><a href="#"> </a></li> </ul> </li> </ul> </div> <div id="midbanner">Flash Banner Here</div> <div id="bottomcontent">Bottom Content Starts Here</div> </div> </body> </html> Hi All, I have my site that uses CSS, however at times I want certain parts of it to not use the CSS. Not whole pages, just a section of a page. Is there anyway to remove all CSS formating in a section? So eg: <div style='none'> Some HTML </div> TIA Charlie Hi, I'm having difficulty with css working correctly. When i udeclare the a:hover state, only part of the code executes (see css code below). I want to invert the colours on the mouse over state i.e. green bg & white text TO white bg & green text. I've tried using w3schools 'try-it' windows and it works fine there but only partly executes on my page, has anyone got any ideas as to the cause of this? I've included all related code. Thanx, Steve CSS code: Code: #level1_nav a { text-decoration: none; font-variant: small-caps; color: #FFFFFF; } a.lvl2_link:link, a.lvl2_link:visited { color: #FFFFFF; background-color: #5C685B; text_decoration: none; font-variant: normal; } a.lvl2_link:hover { color: #5C685B; background-color: #FFFFFF; //this is the only line that executes text_decoration: underline; font-variant: normal; } HTML code: Code: <ul id="level1_nav" style="clear: both;"> <li><a href="companyhome.html">Home</a></li> <li><a href="javascript:subnav('servicessub')">Services</a></li> <li id="servicessub"> <div class="level2_nav"> <div><a class="lvl2_link" href="test1.html">Test 1</a></div> <div><a class="lvl2_link" href="test2.html">Test 2</a></div> <div><a class="lvl2_link" href="test3.html">Test 3</a></div> <div><a class="lvl2_link" href="test4.html">Test 4</a></div> <div><a class="lvl2_link" href="test5.html">Test 5</a></div> </div> </li> </ul> I seem to be having quite the time with Tables and CSS, specifically in regards to column alignment. My previous post was about whether it is possible to have different column widths for the same column in different rows. I have since given up on that endeavour, deciding instead to use CSS aligned DIV tags instead. :^/ However, now I'm having a serious problem with setting the widths of two columns in a table using CSS. The table is quite simple. It's a single table with 5 rows that span two columns, and one row that contains the two columns. The problem is that I want the width of the first column to be 150px with no padding in the cell at all. The column next to is should take up the remainder of the space of the row and have 20px padding on the left and right sides of the cell. While I'd assume this would be an easy task, it appears that it's not to be. Instead, the first column ends up being a VERY large size if there is nothing (ie: text) in the column, and comes out VERY strange when there is something in it. The code is below: PHP Code: <html> <body style="margin-top:0px; margin-left:0px; margin-right:0px; margin-bottom:0px; background-color:#FFFFFF; text-align:center; vertical-align:top;"> <table style="border-collapse: collapse; margin-left:auto; margin-right:auto; width: 750px; height:100%; border-left:#000000 1px solid; border-right:#000000 1px solid;"> <tr> <td colspan="2" style="width:100%; height:200px; border-bottom:#000000 1px solid; padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px;"> </td> </tr> <tr> <td colspan="2" style="width:100%; height:26px; background-color:#FF0000; border-bottom:#000000 1px solid; text-align:right; padding-top:0px; padding-bottom:0px; padding-right:7px;"> </td> </tr> <tr> <td colspan="2" style="width:100%; background-color:#FFFF00; height:15px; padding-left:0px; padding-top:0px; padding-right:0px; padding-bottom:0px;"> </td> </tr> <tr> <td colspan="2" style="width:100%; border-top:#0000FF 1px solid; border-bottom:#0000FF 1px solid; background-color:#00FF00; height:40px; padding-left:15px; padding-top:10px; padding-right:10px; padding-bottom:10px;"> </td> </tr> <tr> <td style="width:150px; background-color:#0000FF; vertical-align:top; text-align:center; border-right:#000000 1px solid; border-bottom:#000000 1px solid; padding-left:0px; padding-top:0px; padding-right:0px; padding-bottom:0px;"> Something01 </td> <td style="background-color:#00FFFF; vertical-align:top; border-bottom:#000000 1px solid; padding-left:20px; padding-top:0px; padding-right:20px; padding-bottom:0px;"> Something02 </td> </tr> <tr style="background-color:#FFFFFF; height:24px;"> <td colspan="2" style="width:100%;"> </td> </tr> </table> </body> </html> Each cell is colored to help identify each one. Is there something blatently obvious that I'm missing or is this a REALLY bad bug that just *happens* to affect Mozilla (Firebird 0.61) AND Internet Explorer 6.0? Any help is MUCH appreciated. :^) - coredumped. On my website I've a few CSS files that I call. Occasionally a page will load and some text won't properly format... It will be too big. I'll refresh and it will go back to the size it's supposed to be. It's not all the text, just here or there. I've tried this on multiple computers and multiple browsers and it still happens only once in a while. Anyone know what is going on? Is there any way to diagnose this? It SEEMS as if part of the file isn't loading, but that doesn't sound right. Hello I have a small image. What I want to do is use the image as a background image, but only display a small section of that image and repeat that section over and over, depending on how much content is on top of the image. I hope I made that clear enough to understand. I have the following code: Code: <style> .vote { background-image: url('images/vote.gif'); background-repeat: repeat-y; background-position: 0 -45; height: 50px; width: 199px; } </style> <div class="vote"> d<br /><br /><Br /><br /><BR /><BR /><br /><br /><br /><br />j </div> That code displays only part of the image, as I want it to, however, I do not know if it is possible to now repeat just that section of the image again and again. I hope someone understands and can help. Thanks Quick nagging question that's been bothering me for some time. Fortunately, I have a link to explain the problem. If you go to our web page (link below), you will see that we have a DIV section on the left side of the page which displays a mini You Tube video, along with a few other buttons: http://bit.ly/gL9sA8 The problem is that when you shrink the window, that particular div will shy away outside the bounds of the browser window. Is there anyway to not have it disappear, but at the same time, not have the main content overlap it in anyway. In other words, how would you code the DIV tag so that the following two things happen: 1. It's always in view on the LEFT side of the webpage 2. The main DIV stops against it, and doesn't overlap it if resized As you can see, if you shrink the size of the window, our main div area (div id: mainWrapper) is always going to be centered which is the most important thing. However, we want to have a left (or right) side area to display buttons like that. Here is the current code for that left sided DIV column: Code: <div style="position:fixed; margin-left: -180px; top: 75px;"> // My html content for mini You Tube video & button is here </div> The problem is that if a person has a low resolution monitor, this left hand div is out of view and never seen.....or even worse, it's partially seen and not fully displayed because it's hiding outside the bounds of the window. My goal: To have it fixed to either the outer LEFT or RIGHT side of the webpage, just along the edge of the mainWrapper as you see it now. If I can clear anything up as to what I'm trying to explain, please let me know. I hope one of you awesome gurus can point me in the right direction! www.devwebsites.com There is a little strip of lightened color on that part and I don't think its from the images at least..I can't for the life of me figure out what is causing it. Thanks Hi and thanks for the help so far Kravvitz. I checked my menu out on IE and got the following results (see screen captures below). You can probably see the element doesn't seem to go to the edge of the dropdown. Because of this the next ul level is appearing right beside the highlighted area (as it would normally), but since it isn't going to the end of the 'row' it is resulting in overlapping! Is there a way to make this work out in IE as well that you could recommend? Thanks. I cannot post the site, since I am a new user, but I will try to explain the situation. I have several pictures which have 50% opacity. On hover, the picture becomes fully opaque. Additionally, every picture has a semi-transparent caption as an overlapping div. Chrome displays the situation correctly, however IE just cuts off the part of the picture underneath the div. So I am left with pictures that are cut off at the bottom. The fading is done by jQuery. Everything described above only happens to JPEGs, PNG-s don't have this problem. Everything works fine in Chrome, but IE doesn't want to cooperate on this one. I will try to select some of the relevant code: The image: Code: <img width="150" height="150" src="xxx" class="portfolio-image" onmouseover="$('td#pitem_1').css('filter', 'alpha(opacity=60)');$('td#pitem_1').fadeTo(300, 1); $('#ptext_1').fadeTo(300, 0.8);" onmouseout="$('td#pitem_1').fadeTo(500, 0.5);$('#ptext_1').fadeTo(500, 0 );"> First css attribute is to address an IE bug where first fade doesn't happen. #pitem_1 is the whole td containing the image and the caption div. #ptext_1 is the caption. Here's the CSS. Identifiers should be obvious. Code: table.portfolio td{ opacity: 0.5; filter: alpha(opacity = 50); -moz-opacity:0.5; background: #FFF; } img.portfolio-image{ } div.portfolio-caption{ margin-top: -23px; height: 10px; background: #000000; font-family: Verdana; font-size: 10px; padding: 5px; color: #FFF; z-index: 999999; opacity: 0; filter: alpha(opacity = 0); -moz-opacity:0; } I'd appreciate all suggestions and tips. Dear All, I have a question - Background : I used the E-book "designing without tables" and created a page with 2 columns. A 200 px column on the left for the links and the rest on the right for the data. There is also a header column on the top with has main menu. Question 1 : If there are 5 links on the left column, how can I link the pages such that when I click on a link on the left column..only the right column should refresh. Meaning, I want the left column to be static with the links and only the right column should be refreshed? Is it possible to do so using only CSS and HTML ? Thanks in advance. Regards. Hey guys, I missed a day of my XHTML class in college and he went over most of the CSS that day, I was sick with the flu and he said that day was the most important, so I'm lost, I need to "Remove any <b>, <i>, <u> and <font> tags and replace them with inline CSS code." So i come up with something like this <Style Type="css/text"> <B style="color:blue> This is my display text </b> </style> PLEASE HELP ME WITH THIS INLINE CSS! HELP! I'M LOSTTTT! hi, I am fairly new to css and working on a website with a complete css layout for the first time, one I got from dreamweaver. I thought things were going great because I did all my testing in Firefox (like a good boy) but then I tried to test it in Internet Explorer 6 and alot if not all of my webpages have the text positioned at the bottom instead of the top of a page. Here is a link: http://www.jcstrategies.com/jeff/featured_listings.php CSS CODE ----------------------------------------------------------- /***********************************************/ /* emx_nav_left.css */ /* Use with template Halo_leftNav.html */ /***********************************************/ /***********************************************/ /* HTML tag styles */ /***********************************************/ body{ font-family: Arial,sans-serif; color: #333333; line-height: 1.166; margin: 0px; padding: 0px; background: #cccccc url(./images/bg_grad.jpg) fixed; } /******* hyperlink and anchor tag styles *******/ a:link, a:visited{ color: #005FA9; text-decoration: none; } a:hover{ text-decoration: underline; } /************** header tag styles **************/ h1{ font: bold 120% Arial,sans-serif; color: #334d55; margin: 0px; padding: 0px; } h2{ font: bold 114% Arial,sans-serif; color: #006699; margin: 0px; padding: 0px; } h3{ font: bold 100% Arial,sans-serif; color: #334d55; margin: 0px; padding: 0px; } h4{ font: 100% Arial,sans-serif; color: #333333; margin: 0px; padding: 0px; } h5{ font: 100% Arial,sans-serif; color: #334d55; margin: 0px; padding: 0px; } /*************** list tag styles ***************/ ul{ list-style-type: square; } ul ul{ list-style-type: disc; } ul ul ul{ list-style-type: none; } /********* form and related tag styles *********/ form { margin: 0; padding: 0; } label{ font: bold 1em Arial,sans-serif; color: #334d55; } input{ font-family: Arial,sans-serif; } /***********************************************/ /* Layout Divs */ /***********************************************/ #pagecell1{ position:absolute; top: 112px; left: 2%; right: 2%; width:95.6%; background-color: #ffffff; } #tl { position:absolute; top: -1px; left: -1px; margin: 0px; padding: 0px; z-index: 100; } #tr { position:absolute; top: -1px; right: -1px; margin: 0px; padding: 0px; z-index: 100; } #masthead{ position: absolute; top: 0px; left: 2%; right: 2%; width:95.6%; } #pageNav{ float: left; width:178px; padding: 0px; background-color: #F5f7f7; border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; font: small Verdana,sans-serif; } #content{ padding: 5px 10px 5px 5px; margin:0px 0px 0px 179px; border-left: 1px solid #ccd2d2; } /***********************************************/ /* Component Divs */ /***********************************************/ #siteName{ margin: 0px; padding: 16px 0px 8px 0px; color: #ffffff; font-weight: normal; } /************** utility styles *****************/ #utility{ font: 75% Verdana,sans-serif; position: absolute; top: 16px; right: 0px; color: #919999; } #utility a{ color: #ffffff; } #utility a:hover{ text-decoration: underline; } /************** pageName styles ****************/ #pageName{ padding: 0px 0px 14px 10px; margin: 0px; border-bottom:1px solid #ccd2d2; } #pageName h2{ font: bold 175% Arial,sans-serif; color: #000000; margin:0px; padding: 0px; } #pageName img{ position: absolute; top: 0px; right: 6px; padding: 0px; margin: 0px; } /************* globalNav styles ****************/ #globalNav{ position: relative; width: 100%; min-width: 640px; height: 32px; color: #cccccc; padding: 0px; margin: 0px; background-image: url(./images/glbnav_background.gif); } #globalNav img{ margin-bottom: -4px; } #gnl { position: absolute; top: 0px; left:0px; } #gnr { position: absolute; top: 0px; right:0px; } #globalLink{ position: absolute; top: 6px; height: 22px; min-width: 640px; padding: 0px; margin: 0px; left: 10px; z-index: 100; } a.glink, a.glink:visited{ font-size: small; color: #000000; font-weight: bold; margin: 0px; padding: 2px 5px 4px 5px; border-right: 1px solid #8FB8BC; } a.glink:hover{ background-image: url(./images/glblnav_selected.gif); text-decoration: none; } .skipLinks {display: none;} /************ subglobalNav styles **************/ .subglobalNav{ position: absolute; top: 84px; left: 0px; /*width: 100%;*/ min-width: 640px; height: 20px; padding: 0px 0px 0px 10px; visibility: hidden; color: #ffffff; } .subglobalNav a:link, .subglobalNav a:visited { font-size: 80%; color: #ffffff; } .subglobalNav a:hover{ color: #cccccc; } /*************** search styles *****************/ #search{ position: absolute; top: 5px; right: 10px; z-index: 101; } #search input{ font-size: 70%; margin: 0px 0px 0px 10px; } #search a:link, #search a:visited { font-size: 80%; font-weight: bold; } #search a:hover{ margin: 0px; } /************* breadCrumb styles ***************/ #breadCrumb{ padding: 5px 0px 5px 10px; font: small Verdana,sans-serif; color: #AAAAAA; } #breadCrumb a{ color: #AAAAAA; } #breadCrumb a:hover{ color: #005FA9; text-decoration: underline; } /************** feature styles *****************/ .feature{ padding: 0px 0px 10px 10px; font-size: 80%; min-height: 200px; height: 200px; } html>body .feature {height: auto;} .feature h3{ font: bold 175% Arial,sans-serif; color: #000000; padding: 30px 0px 5px 0px; } .feature img{ float: left; padding: 0px 10px 0px 0px; } /*************** story styles ******************/ .story { padding: 10px 0px 0px 10px; font-size: 80%; } .story h3{ font: bold 125% Arial,sans-serif; color: #000000; } .story p { padding: 0px 0px 10px 0px; } .story a.capsule{ font: bold 1em Arial,sans-serif; color: #005FA9; display:block; padding-bottom: 5px; } .story a.capsule:hover{ text-decoration: underline; } td.storyLeft{ padding-right: 12px; } /************** siteInfo styles ****************/ #siteInfo{ clear: both; border-top: 1px solid #cccccc; font-size: small; color: #cccccc; padding: 10px 10px 10px 10px; margin-top: 0px; } #siteInfo img{ padding: 4px 4px 4px 0px; vertical-align: middle; } /************ sectionLinks styles **************/ #sectionLinks{ margin: 0px; padding: 0px; } #sectionLinks h3{ padding: 10px 0px 2px 10px; border-bottom: 1px solid #cccccc; } #sectionLinks a:link, #sectionLinks a:visited { display: block; border-top: 1px solid #ffffff; border-bottom: 1px solid #cccccc; background-image: url(./images/bg_nav.jpg); font-weight: bold; padding: 3px 0px 3px 10px; color: #21536A; } #sectionLinks a:hover{ border-top: 1px solid #cccccc; background-color: #DDEEFF; background-image: none; font-weight: bold; text-decoration: none; } /************* relatedLinks styles **************/ .relatedLinks{ margin: 0px; padding: 0px 0px 10px 10px; border-bottom: 1px solid #cccccc; } .relatedLinks h3{ padding: 10px 0px 2px 0px; } .relatedLinks a{ display: block; } /************* relatedLinks2 styles **************/ .relatedLinks2{ margin: 0px; padding: 10px 0px 10px 1px; border-bottom: 1px solid #cccccc; } .relatedLinks h3{ padding: 10px 0px 2px 0px; } .relatedLinks a{ display: block; } /**************** advert styles *****************/ #advert{ padding: 10px; } #advert img{ display: block; } /********************* end **********************/ ANY IDEAS???? |