HTML - Xhtml: Table Cell Background Color And Image Borders
So I decided to see if I could make my site XHTML 1.0 Strict-compliant.
Here's the main page on my test server I'd be thrilled with it if I could do 3 things: - Set the background color of the left column to match the color behind the fonts. Is there a CSS class I can create and set the cells to that class? - Remove the border around clickable images. - Get the spacing between the menu options on the left to look the way it does on the other pages in the site. If you click any of the pages on my actual site you can see the look I'm going for. Thanks as always for the help! Joshua Similar TutorialsHi I want to addd a image for background so i can postion it and not have it repeat : for for a table cell if u see my link below its the purple table cell that has the Bomboniere Adelaide as the heading i only want the background image in that cell - thanks in advance http://weddingsmadeeasy.com.au/adelaide/Bomboniere.html Hello all, First time posting to the forums here. I'm creating a table and each row represents a "tab" of the UI. Each cell has a background image that looksl ike this. however, when I render my table and have text in the cell, the right edge of the tab is chopped off like this.. Any recommendations on some CSS or table attributes that I can aplly to make both rounded ends of the background image appear? I've tried turning off table borders, cell spacing and cell padding. Any help would be greatly appreciated. Thanks. How can I draw an html table without horizontal cell borders? Hi everyone: Any help appreciated. Objective: To have three equally sized and spaced images arranged horizontally, with their size set automatically by the size of the window. Development: I'm using a Mac, and I don't have ready access to a PC to experiment. What I tried: Code: <table> <tr> <td><img src = "a.png" style = "width: 100%" /></td> <td><img src = "b.png" style = "width: 100%" /></td> <td><img src = "c.png" style = "width: 100%" /></td> </tr> </table> <p class = "caption">A caption for the 3 images</p> <p class = "legend" >A legend for the three images</p> What happened: This works perfectly in Safari and Firefox (Mac) and Firefox under Vista, but in Internet Explorer under Vista , the images are HUGE - the unscaled size of the originals. What I think is the reason: IE is taking 100% to be relative to the width of the body element, not the td element. What I don't want to have to do: Use fixed sizes or calculate the sizes on the fly. What I'm trying now: removing the table and using a div, and inside that, setting the image width to 33% and floating one right and one left. What's the trick to get around this IE "gotcha" please? Thanks from a newbie. Hi, I need some code that will make cells in a table change colour (yellow) with mouse over. The problem is that i really need to avoid having to put the code in <TD> as there are about 5000 cells in total! and that will add alot of bytes to it. Needs to work in IE7 and firefox mainly. Any help would be great! Thanks Joe I am working on a site that I have designed using a table to lay everything out. Everything works fine when viewing via IE. I tried opening it with Firefox and the backround colors for the different cells did not show up. Can anyone tell me what I should do so that the bgcolor shows up correctly in firefox? temp web-site address: http://worldcargousa.com/estate_lawn part of the html in question: <td width="166" align="center" valign="middle" bgcolor="61592b"><p align="center" class="style9"><span class="style15">715-220-1879 </span></p> <p class="style13">Estate Lawn Services<br> 536 Gentalwood Square<br> Purcellville, VA 20132</p> <p align="left" class="style8"> </p></td> Hi everyone, I was wondering whether I can add an alt attribute to a table cell background image. I tried to add it in the code after the image address, but it doesn't work. Is there another way? Thanks! Hi, How can I set a background gradient for a cell in a table? (i.e., start colour:#222222; end colour:#000000) The size of the cell may vary so a tiled image wouldn't work. Thanks. OK I am so new to HTML I can't even spell it. I have a industrial HMI the has some custom webpage features to it and I would like to learn how to build the attached Table. I am not looking for someone to do this for me I am looking for some pointers. Here is a link to the device that I am going to use and a quick breakdown of how they do things. This statement that I fully understand, I am out of my knowledge base so that is why I am here "Although the HTML code will be explained or commented through this document, a basic understanding is required to create a proper web site." http://www.redlion.net/Support/TechN...ace/TNOI33.pdf I don't know what CSS is ? I got a few examples from all over the web some from http://www.quackit.com. and just can't figure out the layout and cell colors. I plan on changing the background color on the cell to the right of the descriptor depending on the cell value. Red if <100, Green >100 I would like to start with a cell layout that I can then link values to and from the HMI per the instructions in the Tech Note above. I have played with this device just basically copy and paste the above note I have gotten that working before. Thanks for taking your time to at least read this post from a NOOB. Okay, here's what I've got: two nested tables next to each other, both with two cells in them. The bottom cell on the left table is just a filler, and has a background image to complete the layout of the site -- however, since there's no content in it, it doesn't show up. Giving it a set pixel height makes it show up, but I can't do this, as the content in the other table changes. So, I need this cell (the bottom one on the left) to automatically size itself to whatever the other table is. A height="100%" attribute also doesn't work... Help? Thanks. :] How/where can I add a background color to this table? thanks. Code: <TABLE cellSpacing=0 cellPadding=0 width=100% border=0> <TR> <TD><font class=tbody> <form action="/smusermanager/members/default.asp?action=login" method=post name=login language="JAVASCRIPT" onsubmit="return Validate();"><input type=hidden name=todo value="login"><input type=hidden name=url value="/smusermanager/members/default.asp"> <table border=0 cellspacing=0 cellpadding=0 width=95% align=center class=colorformborder><tr class=colorformborder><td><table border=0 cellspacing=0 width=100% cellpadding=0><tr class=colorformborder><td colspan=2><table border=0 cellspacing=1 cellpadding=5 width=100% colspan=2><tr class=colorformheader><td colspan=2><font class=textsize9><font color=white><b>Login Here</b></font></td></tr> <tr class=colorformfields><td align=center colspan=2><font class=textsize9></font></td></tr><tr class=colorformfieldsalt><td align=right width=50% ><font class=textsize9>Email Address</font></td><td><font class=textsize9><input class=fieldbox type=text size=20 maxlength=50 name="members_username"></font></td></tr> <tr class=colorformfields><td align=right width=20% ><font class=textsize9>Password</font></td><td><font class=textsize9><input class=fieldbox type=password size=20 maxlength=50 name="members_password"></font></td></tr><tr class=colorformfields><td colspan=2 align=right><font class=textsize9><input class=fieldbox type=submit value="Login" id=submit2 name=submit2></font></td></tr> </td></tr></table></td></tr></table></td></tr></table></form> <div style="padding-left: 24px;"> <font face="Arial" color="#000000" size="3"><img src="/images/Hphone.gif" style="vertical-align: middle;"> <a href="?action=login"> Home</a><br><br> <IMG src="/images/clear.gif" width=1 height=5><br><img src="/images/hphone1.gif" style="vertical-align: middle;"><a href="?action=register"> Register</a><br><br> <IMG src="/images/clear.gif" width=1 height=5><br><img src="/images/hphone2.gif" style="vertical-align: middle;"><a href="?action=forgotusername"> FAQ</a><br><br> <IMG src="/images/clear.gif" width=1 height=5><br><img src="/images/hphone3.gif" style="vertical-align: middle;"><a href="?action=forgotusername"> Terms Of Use</a><br><br> <IMG src="/images/clear.gif" width=1 height=5><br><img src="/images/hphone4.gif" hspace="4px" style="vertical-align: middle;"> <a href="?action=forgotusername"> Contact Us</a><br><br> <IMG src="/images/clear.gif" width=1 height=5><br><img src="/images/hphone5.gif" style="vertical-align: middle;"><a href="?action=forgotpass"> Forgot Password</a><br><br> <IMG src="/images/clear.gif" width=1 height=5><br><img src="/images/hphone7.gif" style="vertical-align: middle;"><a href="?action=forgotusername"> Forgot Username</a></font></div> </font> </TD> </TR> </TABLE> Is there a simple attribute for tables that tells it to alternate the colors for every second row? For example, if I want to create a table where the first row background color is grey, the second row is white, the third grey, the fourth white, and so on, is there a simple attribute like "altcolor=grey" or something like that (maybe in CSS)? My tables background color (done with dreamweaver) isn't showing correctly in Firefox. but is in internet explorer. Code: <td colspan="2" rowspan="4" bgcolor="de8801">TEXT</td> is the code I'm using to define the background color? Can anyone help?! Anders Hi everyone. I need some help with one thing. However as it is for an ebay page, I cannot use the head tag. I have seen it on ebay before so I know it can be done just not sure how. Basically I need a table with a row of thumbnail images at the bottom and in the top of the table, there will be an enlarged image. When an thumbnail is either clicked on, or the mouse is placed over he image, a bigger image will be displayed in the top cell. I cannot use anything in the head tag though as its ebay, like css or javascript Thanks for any help received I have an image I want to insert into a simple table Cell. My code is as follows: <table> <tr><td align ="left"> img src = "/modules/Quotes/cqilogo.gif"></td></tr> </table> When I access the page I get: img src = "/modules/Quotes/cqilogo.gif"> I know the image is in the right place and it will work if I set it inside a paragraph. What have I got wrong?? Thanks alot Hello everyone, I am trying to partially hide an image in a table cell. In other words, I don't want the part that is supposed to be hidden to show on the adjacent cells. How do I do that Any help would be greatly appreciated. I am trying to create a table with one cell that contains an image. The image must fill the table vertically from top to bottom. The same code works fine in Firefox, but in IE, it always leaves a gap on the bottom right after the image. Any ideas? Here's the code: <table width="100%" border="1" cellspacing="0" cellpadding="0" height="100" vspace="0" > <tr valign="bottom" height="100" > <td height="100" bordercolordark="000000" > <img src="images/test.jpg" width="600" height="100" vspace="0" hspace="0" border="1"> </td> </tr> </table> Thanks a bunch. I've searched around quite a bit, read various articles and so-on and only really come to the conclusion that this is a lot harder than it should be! What I have is a simple page for a PHP script, it has a little form for entering keywords, and displays an image above this form. Now, what I want to do is place these in a table, and have that table resize to fit the viewable area of the user's browser-window. So, what I have is a table with three-rows: The title of the image The image itself The form for entering image keywords Now, what I would like to do is have the image scale to fill the middle cell, which by default eats up all available space leftover by the form and title cells. However, this isn't happening, I enter a height of 100% for the image but it seems to be using some other container to get its height. I'm generally well-versed in HTML, but this one has me stumped! Any help is appreciated, here is the basic HTML I'm using for what I had thought would be a simple page Code: <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /> <meta name="author" content="Haravikk.com" /> <title>Add keywords</title> <style type="text/css"> body, html { height: 100%; margin: 0; text-align: center; } tr, td, textarea { width: 100%; } table { width: 99%; height: 100%; margin: 0 auto 0 auto; } table, td { border-width: 0; border-spacing: 0; padding: 0; } #image { height: 100%; } #tdTitle { height: 5%; } #tdImg { height: 75%; } #tdForm { height: 20%; } #formText { width: 100%; height: 75%; } </style> </head> <body> <table> <tr> <td id="tdTitle"><b>placeholder.png</b></td> </tr> <tr> <td id="tdImg"> <img id="image" src="http://haravikk.com/placeholder.png" alt="" /> </td> </tr> <tr> <td id="tdForm"> <form action="keywords.php" method="post"> <textarea name="keywords" id="fmrText"></textarea><br /> <input type="submit" /> </form> </td> </tr> </table> </body> </html> Now, I don't know if I could eliminate the table in favour of divs and do this, any suggestions to make the above html work, or to re-write it are welcome! The image provided is just to illustrate the problem I have an image that serves as a text box. It includes a border (i.e., the border is part of the image, not HTML) and a background picture. The picture fades into a solid color at the bottom. This first image depicts the top, left, and right parts of the border. (Here is the plan I first envisioned.) I have created a second image, one pixel tall, of what the rest of the box would look like, after which it would end in a similar 1px-high image of the border color. So, as the background of a div, is there a way to display one image, then have another image repeat indefinitely, followed by a third image? Alternatively, is there a way to have the background be a simple repeated image, with another one on top of it? Then I could cap the bottom in a different div. The most likely solution I have come up with is the following. Why don't I crop off the border and do that with HTML? That way, I have only to display one image, and the rest of the background can be a solid color. I don't know how to do this either, but it seems the most plausible. hi, i have a jsp page, in this page i am displaying data retrieved from mysql database. Now the problem is i must color table cell based on cell value. how to implement this.please give me an sample or working code foe this problem.( any code is accepted) preferably html or javascript. i.e if cell value is "late" then display that cell in red color else display the cell in green color please help me. Thanks ad Regards Akash |