CSS - Html Table Define By Css (using Id's) Not Showing As Specified.
I have a table as specified:
Code: <div id="box"> // 800px set to center it with the rest of page <table id="box"> // for the rest check the css code <tr> <td id="box_top"></td> </tr> <tr> <td id="box_left"></td> <td id="box_middle"></td> <td id="box_right"></td> </tr> <tr> <td id="box_bottom"></td> </tr> </table> </div> Code: div#box { width: 800px; height: auto; } table#box { table-layout: fixed; width: 761px; height: auto; border-collapse: collapse; } #box_top { background-image: url(images/table_02.png); width: 761px; height: 27px; } #box_left { background-image: url(images/table_05.png); background-repeat: repeat-y; width: 19px; min-height: 200px; } #box_middle { background-image: url(images/table_06.png); width: 761px; min-height: 200px; background-repeat: repeat; } #box_right { background-image: url(images/table_07.png); background-repeat: repeat-y; width: 18px; min-height: 200px; } #box_bottom { background-image: url(images/table_12.png); width: 761px; height: 26px; } The table is collapsed (not at the minimum height), and the middle BG is not repeating, not even showing up. Is there anything wrong here? I've tried making a table using <div> tags but I can't really get the float / clear down yet. I've been doing CSS for a whole 2 days . Here is a view of the website. (the first table is using <table>), the 2nd I was trying <div> with floating elements. Similar TutorialsHello, I am still gettin to grips with CSS, and came across a CSS defenition which looked like this... Code: html>body #content { ... ... ... } I wondered what the html>body defines? I know the # defines an ID label. thanks, JT Hi there, Everyone: Firstly, I am a CSS noob... My site is: wwwDOTincenseforpeaceDOTcom (change the word DOT to a . please, new users are not allowed to post URLs on this forum. Thanks) I have a red background gif on my site. In firefox, it looks great. It DOESN'T show through the cell borders of the main table. However, it is showing through the cell borders of a table in Internet Explorer (at least IE 8, haven't checked with earlier versions of IE). Any idea on how to get it to stop showing through on IE? This is what I THINK is the main table CSS (I told you I am a noob when it comes to CSS). #content-container{ clear:both; width:100%; border-style:solid; border-color:#666666; border-spacing:0; border-width:0 0; /* was border-width:1px 0; before */ padding:0 0 0 0; margin:0; /* ie6 min-height hack */ height:270px; max-height:270px !important; Thanks in advance. The following code works in most browsers but not so well in IE, there seems to be an extra block of css shading in the last box in the row. this is what we really want removed. has anyone got any ideas how the issue IE can be fixed. thanks in advance for your help. Code: <style type="text/css"> <!-- .menucontainer { background:#799BD9; margin:0 5px;} .menurtop1, .menurbottom1{ display:block; background:#125892; } .menurtop1 *, .menurbottom1 *{ display: block; height: 1px; overflow: hidden; background:#799BD9; } .r1{ margin: 0 5px} .r2{ margin: 0 3px} .r3{ margin: 0 2px} .r4{ margin: 0 1px; height: 2px } a.one:link { color: #000; } a.one:visited { color: #000; } a.one:hover { color: #fff; } a.one:active { color: #000; } a.one { text-decoration: none; } h1 { text-align: left; font: small tahoma; font-size: 12px; font-weight: bold; margin: 0 0; padding: 5; } h2 { text-align: left; font: small tahoma; font-size: 12px; font-weight: bold; margin: 0 5; padding: 5; } --> </style> <style> <!-- A {color:#000000; font-weight: normal;} A:hover {color: #0066FF; font-weight: normal;} --> </style> <body bgcolor="#003399"> <table width="100%" style="border-collapse:collapse;"> <tr> <td width="0%" height="21"> <div class="menucontainer" align="center"> <b class="menurtop1"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b> <table width="100%" style="border-collapse:collapse;" dwcopytype="CopyTableColumn"> <tr> <td NOWRAP> <div align="center"><a href="http://<?=$siteurl;?>/?ac=a" STYLE="text-decoration: none"><font color="#FFFFFF" face="Tahoma"> l1</font></a> </div></td> <td NOWRAP> <div align="center"><a href="http://<?=$siteurl;?>/members/index.php?ac=s" STYLE="text-decoration: none"><font color="#FFFFFF" face="Tahoma"> l2</font></a> </div></td> <td NOWRAP> <div align="center"><a href="http://<?=$siteurl;?>/members/index.php" STYLE="text-decoration: none"><font color="#FFFFFF" face="Tahoma"> l3</font></a> </div></td> <td NOWRAP> <div align="center"><a href="http://<?=$siteurl;?>/?ac=f" STYLE="text-decoration: none"><font color="#FFFFFF" face="Tahoma"> l4</font></a> </div></td> <td NOWRAP> <div align="center"><a href="http://<?=$siteurl;?>/?ac=c" STYLE="text-decoration: none"><font color="#FFFFFF" face="Tahoma"> l5</font></a> </div></td> <td NOWRAP> <div align="center"><a class="bm" title="link me" href="http://<?=$siteurl;?>/?ac=b" STYLE="text-decoration: none"><font color="#FFFFFF" face="Tahoma"> l6</font></a> </div></td> <td NOWRAP> <div align="center"><a href="http://<?=$siteurl;?>/?ac=s" STYLE="text-decoration: none"><font color="#FFFFFF" face="Tahoma"> l7</font></a> </div></td> </tr> </table> <b class="menurbottom1"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b></div> </td> <td width="5%" NOWRAP><div align="center"><font color="#FFFFFF" size="2" face="Tahoma">123456</font></div></td> </tr> </table> I will try to explain as simple as I can: I have rollover drop down menus, made with <DIV>'s. Showing and hiding them with JavaScript/CSS, usual stuff... While opening and closing menus, and hovering the menu items, table's bkg images are kind of "blinking". I am using CSS to put bkg image to a cell Code: background-image:url(/burakueda/images/bg_gifs/down_end.gif); . I realized that, browser tries to download bkg images everytime I open a pulldown menu, or hover a menu item. I have other images in same page, inserted with <IMG> tag, they don't have any problem. Anyone knows anything about this? Thanks in advance for any help I have a page I'm working on, and while my right column appears correctly in IE (for a change) in FF the right column gets pushed out just a little bit too far. How do I define, in css, that if the browser is FF to use a certain style, but if not to use my default setting? Thanks! Anyone able to guide me to find where to edit form elements? I want to change the 'check box' and 'drop down menu's' The picture you can see is part of a PSD which I'm now "converting" into html... anyway, I'd like to know whether there is a CSS attribute that can define the exact width of borders? Hi! Let's say I define this: #gaga.baracuda {......} #haha.baracuda {other info....} Is this allowed? Hi, I had this working but somehow it's not working again. The problem I am having is that scroll bars are showing up in my iframe in Firefox, Opera, and Safari, but not IE7 and IE6. Here is the link: http://www.caillouette.com/NewCatsMeow/ I know I need to tighten up my style sheet, but if someone could tell me how to solve this, I would be very happy. Here's the iframe code in the index page: Code: <div id="bodyInfo"> <iframe name="mainBody" width="770" height="602" src ="body.html" scrollbars="NO" border="0"> </iframe> <!-- end #bodyInfo --></div> Hello all, First time poster here...hoping to find some answers! I think this is a pretty common issue so I'll be brief. I have a header that is currently coded in HTML (with tables), and I want to convert it to CSS. Of course I need to do this with my entire site, but I figure the header will be a good place to start. This is what I need to convert to CSS: eyemagic.net/zc_header4.htm Thank you for your help! -Dave I am not sure if something like the attached should be put in an html table or done with css positioning. Any thoughts? Hello, I am working with something like this: Code: <div>content one here</div> <table><tr><td>content two here</td></tr></table> How can I get the div to overlap the table and appear on top of it? Thanks! I inherited a big huge site; so there is way much going on; this is a simplification... I am trying to use CSS to divide it into columns, with a column as a div. For debugging, I draw a border around the columns to show me the boundaries. But when I include the following code within the column div: Code: <div class="mycolumn"> <p>Hi, I'm in the Div!</p> <table><tr><td><p> I'm in the table</p> </td></tr></table> <p>Hi, I'm after the table; I would expect to still be in the div</p> </div> The bottom border of the div is drawn right beneath the words "Hi, I'm in the Div", and both "I'm in the table" and "I'm after the table" are outside the box boundary. This does NOT happen if I create a separate test html file and include my Column CSS, but it does happen withing the application. Now, what's going on in the application is extremely complex, involving dozens of included CSS files, javascript, smarty templates which include other smarty templates, and over 4000 files in all. Could one of the other CSS files or something else be redefining <td> somehow, or any other obvious thing that could be breaking the div? Obviously, I keep trying to debug it, but if any old hand has an explanation that might save me another 8 hours, that would be greatly appreciated. Thanks, Chris I haven't had much luck on converting the html table with an image in it to a css <div> that can look like a html table in a way. Old Way Code: <table border="1" cellpadding="5" cellspacing="2"> <tr> <td> <img src="test.gif"> </td> </tr> </table> New Way Code: <style type="text/css"> div.divTest { margin: 12px 0px 0px 30px; padding: 8px 8px 8px 8px; border: 3px double #000000; /* width: 0px; */ } </style> <div class="divTest"> <img src="test1.gif"> </div> Since the html table is for displaying the data and the image isn't one of them as stated by the w3.org's rule. Thanks.. I'm pretty new to CSS but I'm slowly working through problems on a site I am making for some friends (more accurately a template for their content publisher) and I came across a problem. I have a table that contains all of the pictures spaced properly, but I can't get it to resize down to something that makes sense. I tried adding style="... directly to it as well as width="... but none seem to resize it. (I tried both fixed and percentages) Link: http://www.coreconsciousness.com/orangenew.html Heres the code, the external CSS doesn't contain anything important at the moment: 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 name="generator" content="HTML Tidy for Linux (vers 1 September 2005), see www.w3.org" /><!--Don't add anything above this line, you may change the DTD to match your page--> <title>Test Page</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="main.css" type="text/css" /> <style type="text/css"> td.c1 { background-image: url('images/textboxorange.gif'); background-repeat: repeat-y; width:100%; } </style> </head> <body> <table id="Table_01" border="0" cellpadding="0" cellspacing="0" width="900px"> <tr> <td colspan="8"><img src="images/Orangenew_02.png" alt="" /></td> </tr> <tr> <td colspan="8"><img src="images/Orangenew_04.png" alt="" /></td> </tr> <tr> <td rowspan="2"><img src="images/Orangenew_05.png" alt="" /></td> <td rowspan="2"><img src="images/Orangenew_06.png" alt="" /></td> <td rowspan="2"><img src="images/Orangenew_07.png" alt="" /></td> <td rowspan="2"><img src="images/Orangenew_08.png" alt="" /></td> <td rowspan="2"><img src="images/Orangenew_09.png" alt="" /></td> </tr> <tr> <td><img src="images/Orangenew_11.png" alt="" /></td> <td><img src="images/Orangenew_12.png" alt="" /></td> <td rowspan="3"><img src="images/Orangenew_13.png" alt="" /></td> </tr> <tr> <td colspan="7"><img src="images/Orangenew_14.png" alt="" /></td> </tr> <tr> <td colspan="8" class="c1"> <h1>#CONTENT#</h1> <img src="images/Orangenew_15.png" alt="" /> </td> </tr> </table> </body> </html> Hi. First of all i am new to CSS styling . I am using asp.net and i have created an html table in wich i added some treeviews, labels and stuff. I aslo created a StyleSheet where i wanna add style to a specific label within the table. Maybe it's very simple but i don't know what else to do, i am trying to do that by ours. For instance, #Label1 { color:Orange; } it's not working, if has no effect. Label1 is the name of the label. I think i'm not refering correct the Label. Should i add a reference to the table too? i tried something but it were wrong Hi, Have a problem with a left-hand table, the content of which is dragged down the page when the right-hand table grows in the same direction, say when filling it with content. I need to anchor that left-hand table in place but allow the right-hand table to stretch vertically. Have tried absolute CSS positioning, spacers, extra tables, 100% height - nothing seems to work. I've simplified the HTML code for readability, but the general layout is pretty much intact: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <table width="668" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="49" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="667" height="49"> </td> </tr> </table></td> <td width="1"></td> </tr> <tr> <td width="147" rowspan="3" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="147" height="147"> </td> </tr> </table></td> <td width="520" height="32" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="520" height="32"> </td> </tr> </table></td> <td></td> </tr> <tr> <td height="24" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="520" height="24"> </td> </tr> </table></td> <td></td> </tr> <tr> <td rowspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="517" height="419" valign="top"><div align="center">RIGHT-HAND TABLE </div></td> </tr> </table></td> <td height="91"></td> </tr> <tr> <td height="328" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="146" height="328" valign="top"><div align="center">LEFT-HAND TABLE </div></td> </tr> </table></td> <td></td> </tr> <tr> <td height="482"> </td> <td> </td> <td></td> </tr> </table> </body> </html> Thanks, Dyb Hey guys, Im having problems cleaning up my HTML and replacing it by CSS code. <td width="65" height="1" style="vertical-align: top" align="left" bgcolor="#F0F0F0"> The html table code above is what I've been trying to change to CSS. Please help Is it not possible to do the following? What is the correct way of aligning a cell if not? PHP Code: TD.theader { background-color: #D0D0D0; border: 1px solid #000000; padding:5px; horizontal-align: right; } |