CSS - Make Table Row (<tr>) Lightup On Mouseover
i am trying to make the same effect like phpMyAdmin (when you put your mouse over a row of a table the entire table lights up, not just the links)
whats the best way to do this, it looks like it seems the only way to do it is with javascript and css but all the the solutions ive tried ot search for doesnt do what i want it to do Similar Tutorialshttp://www.kafadrian.com/juggernaut/index.html is what i have so far I want it to look like: http://www.kafadrian.com/juggernaut/layout.jpg The problem im having is that the image links that have mouseover effects dont align (touch) the blue bar below them and apparently in some browsers the image links themselves have gaps between them I spent hours, and yes im relatively noobish about all this, trying all sorts of different display commands and border/margin commands to try and get rid of any spaces, the way the site is now (10.01.08) is the best i could get it. in IE7 the mouseover images connect horizontally but not vertically with other images. am i going about this all wrong? my experience in building websites is mostly from the early eras of netscape when IE was new, back when you put stuff in a table a certain way with no cellpadding/spacing/border and everything aligned no problem. I appreciate any help with this as I undertand it will take time to give me an answer that no only makes sense (to me) but will work. the code for the site is: 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 http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Juggernaut - Monolith - Order</title> </head> <body marginheight="0" marginwidth="0" leftmargin="0" rightmargin="0" topmargin="0"> <script type="text/javascript"> <!-- var image1 = new Image(); image1.src = "news1.jpg"; var image2 = new Image(); image2.src = "news2.jpg"; var image3 = new Image(); image3.src = "news3.jpg"; var image4 = new Image(); image4.src = "roster1.jpg"; var image5 = new Image(); image5.src = "roster2.jpg"; var image6 = new Image(); image6.src = "roster3.jpg"; var image7 = new Image(); image7.src = "forums1.jpg"; var image8 = new Image(); image8.src = "forums2.jpg"; var image9 = new Image(); image9.src = "forums3.jpg"; var image10 = new Image(); image10.src = "files1.jpg"; var image11 = new Image(); image11.src = "files2.jpg"; var image12 = new Image(); image12.src = "files3.jpg"; var image13 = new Image(); image13.src = "info1.jpg"; var image14 = new Image(); image14.src = "info2.jpg"; var image15 = new Image(); image15.src = "info3.jpg"; var image16 = new Image(); image16.src = "founded.jpg"; //--> </script> <script type="text/javascript"> <!-- function roll(img_name1, img_src1, img_name2, img_src2) { document[img_name1].src = img_src1; document[img_name2].src = img_src2; } //--> </script> <table border="0" cellspacing="0" cellpadding="0" style="margin:0"> <tr height="34"> <td rowspan="4"> <img style="display:block" src="juggernaut.jpg" width="560" height="110"/> </td> <td> </td> </tr> <tr> <td> <a href="index.html" style="display:inline-block" onmouseover="roll('news','news2.jpg','text','news3.jpg')" onmouseout="roll('news','news1.jpg','text','founded.jpg')"> <img style="display:inline-block" src="news1.jpg" name="news" width="48" height="48" border="0"/> </a> <a href="index.html" style="display:inline-block" onmouseover="roll('roster','roster2.jpg','text','roster3.jpg')" onmouseout="roll('roster','roster1.jpg','text','founded.jpg')"> <img style="display:inline-block" src="roster1.jpg" name="roster" width="48" height="48" border="0"/> </a> <a href="index.html" style="display:inline-block" onmouseover="roll('forums','forums2.jpg','text','forums3.jpg')" onmouseout="roll('forums','forums1.jpg','text','founded.jpg')"> <img style="display:inline-block" src="forums1.jpg" name="forums" width="48" height="48" border="0"/> </a> <a href="index.html" style="display:inline-block" onmouseover="roll('files','files2.jpg','text','files3.jpg')" onmouseout="roll('files','files1.jpg', 'text','founded.jpg')"> <img style="display:inline-block" src="files1.jpg" name="files" width="48" height="48" border="0"/> </a> <a href="index.html" style="display:inline-block" onmouseover="roll('info','info2.jpg','text','info3.jpg')" onmouseout="roll('info','info1.jpg','text','founded.jpg')"> <img style="display:inline-block" src="info1.jpg" name="info" width="48" height="48" border="0"/> </a> </td> </tr> <tr> <td> <img style="display:block" src="line_right.jpg" width="240" height="4"/> </td> </tr> <tr> <td> <img style="display:block" src="founded.jpg" align="right" name="text" width="144" height="20"/> </td> </tr> </table> </body> </html> Hello: I am building a ecommerce site, there are featured product on frontpage, I want to make a square border for each product, I have done top border and bottom border, but I don't know how to make the vertical lines on the right and left to make a nice square border with rounded corner the html structure is as followings table-----for the top border table-----to display product image and price, all that table-----for the bottom border I know by putting in css code for the middle table will be able to close this border could anyone tell me how? hi I am shifting to web 2.0 therefore learning a lot of things that I used to do with tables. Now I have a task to make a form and also display text in parallel style e.g Name User Name ------- Rating stars Email User Email ------- Balance amount to accomplish this in tables we might make two cells to hold Name, EMail in one and Rating and Balance in the second then in each CELL further rows and cells for each entity e.g Name User Name how can we display this kinda info using pure CSS? I found a website online http://www.compare-voip.net/viatalk.php there towards the bottom you can see how the email and rating stats are displayed in two columns, this is done with tables though I want to do the same with CSS only thanks in advance Hey folks, i'm trying to get the effect of the following image: http://www.dgemu.com/Images/first_steps.jpg Basically I got it all set up 'cept for Metroid's image, which is just driving me insane.. I used absolute positioning on the metroid image so I could use relative positioning on that table thingy and use z-index to put it there, but I'm having problems with the text - it goes behind the image ahhhh - what can I do? I was thinking perhaps adding relative positioning for the text too and make it above the image but what I want is to not touch the image - u know like u do float:right on the image - but I can't use float 'cuz then the z-indexing thing messes up.. hmm.. can anyone help me? Hi guys I'm having a little problem with a <table> based website Please check the following image Each circle in the image attached is a separate image file, and I must make each image to be inside design. My problem is that the images doesn't fit in the <td> area, so well... Is there a way I can make the images float over the table ? I mean, a decent way to do this without having to convert entire design form <tables> to <divs> (PS: I'm still learning tableless designs) Thanks a lot in advance Hi I have this CSS style: .spacer { font-size: 1px; font-family: Arial, Helvetica, sans-serif; } I use it as a 1pixel style in table colums that i want to be 1 pixel in width: <td width="1" bgcolor="#999999" class="spacer"> </td> in firefox and IE they are fine but in opera they get thinker, is there another setting i need to add to the CSS to prevent the browser from making the 1pixel width biger? also are there any other standard browser that i should make sure my site works on? cheers, bigals. OK...thbbt. Situation 1 (the one that works as I want) Code: <table style="width: 100%"> <tr> <td style="width: 15em">Column 1</td> <td>Column 2</td> </tr> </table> In Situation 1, the second column expands to be all of the remaining width. This is good. Situation 2 Code: <table style="width: 100%"> <tr> <td style="width: 15em">Column 1</td> <td>Column 2</td> <td>Column 3</td> </tr> </table> In Situation 2, column 2 and 3 share the remaining space. I want column 2 to take no more than exactly the space it needs. I want column 3 to expand to take all the remaining space. The only way I've found that (sorta) works is to actually use the old HTML width="" attribute and make it a percentage that's impossible. If you make it 95% or something, then all the other columns squeeze down pretty far. The issue with this approach is that it ignores the style width of the first column and just crushes it as much as possible. Anyone have an idea? Thanks Tim Can it be done with just CSS? I have a table of data where the text in the data cells wraps and fills the td cell with several lines of text. This is OK when the browser window is a "normal" size, but if someone is viewing with a widescreen monitor I would like the table to get wider and make the cell contents not wrap the text. Or if they are viewing with a small monitor I want it to wrap even more (table would get smaller). Can this be done with CSS, or do I need to do something with javascript? I'm fighting with this for a while now. I want to change my table layout into div based one, but keeping all the positive features of table design. The layout is based on percents and em (the liquid philosophy) The problem: Make div resize like table cell with minimal width equal to width of widest unbreakable element. I don't want my "verylongunnecesaryword" stick out of menu div nor dissapear partaily when resizing the window. I basically want the menu to always stay wide enough to accomodate the longest word and resize dynamically with window and fonts. There is no such problem when using tables, cells automatically resize to fit content and never become so small that content sticks out or disappear. Setting the min-width with either em, px nor percent is a no go, because it's impossible to tell what size will the biggest element be. No javascript either. Also keeping it IE6 complaint would be good. I still think that tables are the best idea and unless someone shows me how to fix this problem with div and css, I'm just sticking with tables till the end of world. shortened HTML: Code: <div class="menu"> menu here </div> <div class="contents"> the rest of page </div> shortened CSS: Code: .menu {float: left; width: 20%; padding: 1%; } .contents {float: left; padding: 1%; width: 76%; } Im new to CSS... i have created a nested set of <div> tags, the outer one is an image and the second one has a white background with an opacity set to it so you can see the image behind it, and the box has some text inside... i want to have a mouseover event that makes that second div invisible (so that the whole photo behind it will show). Either a mouseover or a mouseclick event...i would prefer a mouseclick, but i need one or the other i dont want to end up doing it in photoshop with rollover images...its so much prettier in CSS! -Thank You I have several small images in a row. Mouseover on each changes them to different image. However, trying to achieve paragraph of text to appear below this row - differerent <div> of text depending on which image is hovered over. My trial so far uses code below. (a) am I correct in saying I can achieve what I want with only CSS? (b) I know it's got something to do with hiding and showing a block?!? Suggestions appreciated. Thanks. <style type="text/css"> div.image1 { background: url(image1.jpg) no-repeat top left; width: 100px; height: 100px; } div.image1:hover { background: url(image1_hover.jpg) no-repeat top left; width: 100px; height: 100px; } </style> <div class="image1"> </div> Sup /css/. Here is the temporary build of my page. The links are dead on purpose: http://www.mindwallpictures.com/files/temp/mediachef If you click on "services" you'll see a drop down list appear. I have mouseovers on these links which make an image appear toward the top of the page. "web&graphic, film&video, etc..." However, the links for 'portfolio', 'about us' and 'contact us' should also have this same mouseover effect. But they do not work. I believe this is a problem with my css and not the javascript, because when I swap out a mouseover command of one of the non-working links for one of the working links, the image will appear. It seems to not want to toggle those particular divs. Here is the javascript code: Code: <script language="Javascript" type=""> <!-- function toggleDiv(id,flagit) { if (flagit=="1"){ if (document.layers) document.layers[''+id+''].visibility = "show" else if (document.all) document.all[''+id+''].style.visibility = "visible" else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible" } else if (flagit=="0"){ if (document.layers) document.layers[''+id+''].visibility = "hide" else if (document.all) document.all[''+id+''].style.visibility = "hidden" else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden" } } //--> </script> The related css: Code: #webgraphic {position:absolute; top:25px; left:179px; width:58px; height:382px; visibility:hidden; background:url(images/webgraphic.gif);} #filmvideo {position:absolute; top:25px; left:179px; width:58px; height:382px; visibility:hidden; background:url(images/filmvideo.gif);} #musicaudio {position:absolute; top:25px; left:179px; width:58px; height:382px; visibility:hidden; background:url(images/musicaudio.gif);} #photography {position:absolute; top:25px; left:179px; width:58px; height:382px; visibility:hidden; background:url(images/photography.gif);} #portfolio {position:absolute; top:25px; left:179px; width:58px; height:382px; visibility:hidden; background:url(images/portfolio.gif);} #about {position:absolute; top:25px; left:179px; width:58px; height:382px; visibility:hidden; background:url(images/about.gif);} #contact {position:absolute; top:25px; left:179px; width:58px; height:382px; visibility:hidden; background:url(images/contact.gif);} and the xhtml: Code: <div class="sidemenu"> <div id="links"> <div><a href="/">home</a></div> <a href="javascript:animatedcollapse.toggle('services')">services</a></div> <div id="services"> <a href="#" onmouseover="toggleDiv('webgraphic',1)" onmouseout="toggleDiv('webgraphic',0)">web & graphic</a><br /> <a href="#" onmouseover="toggleDiv('filmvideo',1)" onmouseout="toggleDiv('filmvideo',0)">film & video</a><br /> <a href="#" onmouseover="toggleDiv('musicaudio',1)" onmouseout="toggleDiv('musicaudio',0)">music & audio</a><br /> <a href="#" onmouseover="toggleDiv('photography',1)" onmouseout="toggleDiv('photography',0)">photography</a> </div> <div id="links"> <div><a href="#" onmouseover="toggleDiv('portfolio',1)" onmouseout="toggleDiv('portfolio',0)">portfolio</a></div> <div><a href="#" onmouseover="toggleDiv('about',1)" onmouseout="toggleDiv('about',0)">about us</a></div> <div><a href="#" onmouseover="toggleDiv('contact',1)" onmouseout="toggleDiv('contact',0)">contact us</a></div> </div> </div> It acts as if it's a problem with syntax, but I don't see any errors and my code is validated. Any help would be greatly appreciated. Thanks. Hi I'm kinda new to this forum, so i'll just hope im in the right place to post my problems.. I'm from the Netherlands, so i dont know if my English is always correct.. I'll try to make it as best as i can.. ok.. that was the short intro.. now the problem: ok.. i have made the following page, using some css from a website. Code: <html> <head> <title>lol</title> </head> <style media="screen" type="text/css"> /* NAVIGATION BUTTONS */ .cssnav { position:relative; font-family: arial, helvetica, sans-serif; background-image: url(overbtn2.jpg); background-repeat: no-repeat; white-space: nowrap; display: block; width: 211px; height: 44px; margin: 0; padding: 0; } .cssnav a { display: block; color: #000000; font-size: 11px; width: 211px; height: 44px; display: block; float: right; color: black; text-decoration: none; } .cssnav img {width: 211px; height: 44px; border: 0; } * html a:hover {visibility:visible} .cssnav a:hover img{visibility:hidden} .cssnav span { position: absolute; left: 30px; top: 15px; margin: 0px; padding: 0px; cursor: pointer; width: 149px; height: 14px; text-align: center; } /* END OF NAVIGATION */ </style> <body bgcolor="#000000"> <!--MAIN NAVIGATION START--> <div class="cssnav"><a href="onder.html" target="onder" title="home"><img src="downbtn2.jpg" alt="home" /><span>home</span></a></div> <div class="cssnav"><a href="onder.html" target="onder" title="home"><img src="downbtn2.jpg" alt="home" /><span>home</span></a></div> <div class="cssnav"><a href="onder.html" target="onder" title="home"><img src="downbtn2.jpg" alt="home" /><span>home</span></a></div> <div class="cssnav"><a href="onder.html" target="onder" title="home"><img src="downbtn2.jpg" alt="home" /><span>home</span></a></div> <div class="cssnav"><a href="onder.html" target="onder" title="home"><img src="downbtn2.jpg" alt="home" /><span>home</span></a></div> <div class="cssnav"><a href="onder.html" target="onder" title="home"><img src="downbtn2.jpg" alt="home" /><span>home</span></a></div> <div class="cssnav"><a href="onder.html" target="onder" title="home"><img src="downbtn2.jpg" alt="home" /><span>home</span></a></div> <div class="cssnav"><a href="onder.html" target="onder" title="home"><img src="downbtn2.jpg" alt="home" /><span>home</span></a></div> <!--MAIN NAVIGATION END--> </body> </html> this was a test page for a menu i am currently making. I also wanted to make a link that works quite like this, only without the text in the buttons. Currently the idea is like.. i made a nice pic in paint of a closed book, and on a mouseover.. the other pic i made, an opened book, should appear.. but it doesnt the source is now like this Code: <html> <head> </head> <style media="screen" type="text/css"> /* NAVIGATION BUTTONS */ .cssnav { position:relative; background-image: url(open.bmp); background-repeat: no-repeat; white-space: nowrap; display: block; margin: 0; padding: 0; } .cssnav a { display: block; display: block; float: right; color: black; } .cssnav img {border: 0} * html a:hover {visibility:visible} .cssnav a:hover img{visibility:hidden} } /* END OF NAVIGATION */ </style> <body bgcolor="#000000"> <!--MAIN NAVIGATION START--> <div class="cssnav"><a href="onder.html" target="onder" title="home"><img src="dicht.bmp" alt="home" /><span>home</span></a></div> <!--MAIN NAVIGATION END--> </body> </html> can anyone please tell me how i can solve this problem? thanks in advance.. -Emiel- Have a look at this menu: http://elliottback.com/wp/wp-conten...e-x/googlex.htm Is it possible to achieve that effect using a navbar (marked up as a list), and using CSS rather than javascript? Please provide examples / links. I'm trying to scroll a div when the mouse is over the div. the div has the auto value for the overflow property. Is this possible and if so could someone help me out on how to do it? I was thinking something using the javascript document.getelementbyId() but i can't figure out what property to use. Thanks I am having trouble with my CSS mouse over links. XHTML and CSS3 both validate. However the large image for the mouse over isn't showing. I have check everything I can think of and still am totally unable to figure it out. It has been years since I have built a web page and am trying again so this site has not been published as of yet but is still accessible to look at. Below is the link to my site and the external CSS style sheet. I also have CSS code on the XHTML page as well. Could someone please take a look and see what I am over looking? Thank You Selena I made a mistake.. I'm not a student. simplyselena.com and external style is simplyselena.com/css/styles.css Sorry the above is the only way I could put url in not allowed to post url's as I am a new user account. Hi, I own WNV2 (offline atm click here to see preview) and I am trying to remove all tds trs and tables from my site. To do this need to change my mysql database row printout to css rather than the trs. I want to have the same efffect as Spoono (look at "fresh Meat" on their main page). Anyhelp would be appreciated. Thanks Does anybody knows how to change the bgcolor of a box when we hover the mouse over it? Go http://www.avocadolite.com/v9/ to get what i mean. In this case the avocado's bgcolor is green, i think. |