HTML - Why Isn't My Div's Bg Image Repeating?
Here is the link to the page.
As you can see, when you scroll down, the background just stops. Here is a portion of the CSS that deals with this bit: #page{ background-image:url("imgs/bg.jpg"); background-repeat:repeat-y; margin:auto; width:960px; font-family:Helvetica,sans-serif; margin-top:-10px; padding-top:20px; font-size:11pt; } #page-content{ width:920px; margin:auto; height:1090px; } Can anyone help please? Similar TutorialsI'm going to revisit this because a suggestion made in a former thread didn't work (and believe me I tried for hours). I've attached an image that I created in photoshop and sliced up and imported into dreamweaver. Much like this website, I want the header & body to stretch across the browser regardless of size. The three "yellow squares" I want to remain static (not stretch). The right most yellow box which contains the example of a search box I want to remain at the top left most point of the browser regardless of size (same with the two other yellow boxes (but at the top right). The red area, I want to repeat (stretch) as the browser gets bigger or contract as it gets smaller. What I did was slice the image and import into dreamweaver (automatically puts it into tables). So I put each of the 4 sections into its own div tag. Then for the repeater image I applied CSS whereby the image would be a background and repeat (% of browser). That's where I'm stuck. I have no idea how to solve this problem and I've seen it done on many other website but can't seem to figure it out. If anyone can help, I would be very grateful. Thank You! As the title says: Is it possible to repeat an image horizontally that is not a background image? Thank you! (on IE not firefox) On the bottom of my webpage I cant get a body backround image to stop repeating itself on the bottom of the page, I tried many things and if i try closing more tags it messes other lines up can anyone help me? you can see the problem he http://lilions.com/testindex/ heres some of the code but the whole page wont fit so please veiw source Code: <br></br><br></br> <center> <img src="http://lilions.com/home/images/tpc2.jpg"></center><center><img src="http://lilions.com/home/images/cnttp2.jpg"></center><table style="border-collapse: collapse;" width=1000 height=1090> <td id="center-mid"> </center> <font color="#FFFFFF"> <table border="3" bordercolor="FFFFFF" width="750" bgcolor="000000"> <tr> <td><b><center><font color="#FFFF00"> # </center></b></td> <td><b><center><font color="#FFFF00"> NAME </center></b></td> <td><b><center><font color="#FFFF00"> POS. </center></b></td> <td><b><center><font color="#FFFF00"> HT. </center></b></td> <td><b><center><font color="#FFFF00"> WT. </center></b></td> <td><b><center><font color="#FFFF00"> AGE </center></b></td> <td><b><center><font color="#FFFF00"> EXP. </center></b></td> <td><b><center><font color="#FFFF00"> SCHOOL </center></b></td> </tr> <tr> <td> 0 </td> <td><a href="http://lilions.com/roster/BlairBines" target="_blank" > Blair Bines </td></a> <td> WR/TE</td> <td> 6'</td> <td> 260 </td> <td> N/A </td> <td> N/A </td> <td> Rutgers </td> </tr> <tr> <td> 1 </td> <td><a href="http://lilions.com/roster/AnthonyCentrella" target="_blank" > Anthony Centrella </td></a> <td> WR/TE</td> <td> 5'9 </td> <td> 230 </td> <td> N/A </td> <td> N/A </td> <td> William Floyd </td> </tr> <tr> <td> 2 </td> <td><a href="http://lilions.com/roster/BradMcCoy" target="_blank" > Brad McCoy </td></a> <td> LB/ DE </td> <td> 6'2 </td> <td> 230 </td> <td> N/A </td> <td> N/A </td> <td> Nassau CC </td> </tr> <tr> <td> 3 </td> <td><a href="http://lilions.com/roster/BrandonOresto" target="_blank" > Brandon Oresto </td></a> <td> WR </td> <td> 6'2 </td> <td> 195 </td> <td> N/A </td> <td> N/A </td> <td> William Floyd </td> </tr> <tr> <td> 4 </td> <td><a href="http://lilions.com/roster/JohnChestnut" target="_blank" > John Chestnut </td></a> <td> WR/DB</td> <td> 6'</td> <td> 175 </td> <td> N/A </td> <td> N/A </td> <td> Cheyney Univ. </td> </tr> <tr> <td> 5 </td> <td><a href="http://lilions.com/roster/AlicioMettelus" target="_blank" > Alicio Mettelus </td></a> <td> DB </td> <td> 5'11 </td> <td> 190 </td> <td> N/A </td> <td> N/A </td> <td> N/A </td> </tr> <tr> <td> 6 </td> <td><a href="http://lilions.com/roster/StevieLeachJr" target="_blank" > Stevie Leach Jr. </td></a> <td> RB </td> <td> 5'11 </td> <td> 220 </td> <td> N/A </td> <td> N/A </td> <td> Charleston Southern </td> </tr> <tr> <td> 7 </td> <td><a href="http://lilions.com/roster/SteveOliveri" target="_blank" > Steve Olivei </td></a> <td> DB </td> <td> 5'8 </td> <td> 180 </td> <td> N/A </td> <td> N/A </td> <td> Commack </td> </tr> <tr> <td> 8 </td> <td><a href="http://lilions.com/roster/DonBonacorsa" target="_blank" > Don Bonacorsa </td></a> <td> P </td> <td> 5'7 </td> <td> 220 </td> <td> N/A </td> <td> N/A </td> <td> Commack </td> </tr> <tr> <td> 10 </td> <td><a href="http://lilions.com/roster/PeteBonelli" target="_blank" > Pete Bonelli </td></a> <td> LB </td> <td> 5'4</td> <td> 190 </td> <td> N/A </td> <td> N/A </td> <td> Molloy </td> </tr> <tr> <td> 11 </td> <td><a href="http://lilions.com/roster/DarnellWest" target="_blank" > Darnell West </td></a> <td> WR </td> <td> 5'10 </td> <td> 185 </td> <td> N/A </td> <td> N/A </td> <td> N/A </td> </tr> <tr> <td> 12 </td> <td><a href="http://lilions.com/roster/RobZippel" target="_blank" > Rob Zippel </td></a> <td> QB </td> <td> 6'1 </td> <td> 200 </td> <td> N/A </td> <td> N/A </td> <td> William Floyd </td> </tr> <tr> <td> 16 </td> <td><a href="http://lilions.com/roster/EdDixon" target="_blank" > Ed Dixon </td></a> <td> WR/DB </td> <td> 6'</td> <td> 205 </td> <td> N/A </td> <td> N/A </td> <td> N/A </td> </tr> <tr> <td> 18 </td> <td><a href="http://lilions.com/roster/CleefMettelus" target="_blank" > Cleef Mettelus </td></a> <td> WR </td> <td> 6'2 </td> <td> 215 </td> <td> N/A </td> <td> N/A </td> <td> N/A </td> </tr> <tr> <td> 19 </td> <td><a href="http://lilions.com/roster/SeanKenna" target="_blank" > Sean Kenna </td></a> <td> WR/KR </td> <td> 5'7 </td> <td> 190 </td> <td> N/A </td> <td> N/A </td> <td> Suffolk CC </td> </tr> <tr> <td> 20 </td> <td><a href="http://lilions.com/roster/ChrisPalazzolo" target="_blank" > Chris Palazzolo </td></a> <td> WR/KR </td> <td> 5'8 </td> <td> 180 </td> <td> N/A </td> <td> N/A </td> <td> Commack </td> </tr> <tr> <td> 24 </td> <td><a href="http://lilions.com/roster/KeithGraydon" target="_blank" > Keith Graydon </td></a> <td> WR/DB </td> <td> 5'10 </td> <td> 200 </td> <td> N/A </td> <td> N/A </td> <td> Smithtown </td> </tr> <tr> <td> 31 </td> <td><a href="http://lilions.com/roster/JairRomero" target="_blank" > Jair Romero </td></a> <td> RB</td> <td> 5'9</td> <td> 240 </td> <td> N/A </td> <td> N/A </td> <td> Wynadanch </td> </tr> <tr> <td> 32 </td> <td><a href="http://lilions.com/roster/DaWhiteHines" target="_blank" > DaWhite Hines </td></a> <td> LB </td> <td> 5'10 </td> <td> 230 </td> <td> N/A </td> <td> N/A </td> <td> N/A </td> </tr> <tr> <td> 34 </td> <td><a href="http://lilions.com/roster/JohnLockwood" target="_blank" > John Lockwood </td></a> <td> LB </td> <td> 6'</td> <td> 200 </td> <td> N/A </td> <td> N/A </td> <td> Bellport </td> </tr> <tr> <td> 35 </td> <td><a href="http://lilions.com/roster/AlfredFranklin" target="_blank" > Alfred Franklin </td></a> <td> RB </td> <td> 5'8 </td> <td> 195 </td> <td> N/A </td> <td> N/A </td> <td> N/A </td> </tr> <tr> <td> 38 </td> <td><a href="http://lilions.com/roster/CarlLorasille" target="_blank" > Carl Lorasille </td></a> <td> DB </td> <td> 5'10 </td> <td> 200 </td> <td> N/A </td> <td> N/A </td> <td> N/A </td> </tr> <tr> <td> 40 </td> <td><a href="http://lilions.com/roster/ChadLeach" target="_blank" > Chad Leach </td></a> <td> DE/FB</td> <td> 5'9 </td> <td> 220 </td> <td> N/A </td> <td> N/A </td> <td> Lindenhurst </td> </tr> <tr> <td> 45 </td> <td><a href="http://lilions.com/roster/LondonJRStanley" target="_blank" > London JR Stanley </td></a> <td> DE</td> <td> 6'3 </td> <td> 220 </td> <td> N/A </td> <td> N/A </td> <td> Longwood </td> </tr> <tr> <td> 49 </td> <td><a href="http://lilions.com/roster/CraigPinto" target="_blank" > Craig Pinto </td></a> <td> K </td> <td> 5'8 </td> <td> 170 </td> <td> N/A </td> <td> N/A </td> <td> Hofstra Univ </td> </tr> <tr> <td> 50 </td> <td><a href="http://lilions.com/roster/BrianHope" target="_blank" > Brian Hope </td></a> <td> DL </td> <td> 6'1 </td> <td> 240 </td> <td> N/A </td> <td> N/A </td> <td> Connetquot </td> </tr> <tr> <td> 51 </td> <td><a href="http://lilions.com/roster/FinkleyDufort" target="_blank" > Finkley Dufort </td></a> <td> DL </td> <td> 6'1 </td> <td> 250 </td> <td> N/A </td> <td> N/A </td> <td> Newton </td> </tr> <tr> <td> 52 </td> <td><a href="http://lilions.com/roster/JamelDudley" target="_blank" > Jamel Dudley </td></a> <td> DL</td> <td> 6'3 </td> <td> 270 </td> <td> N/A </td> <td> N/A </td> <td> N/A </td> </tr> <tr> <td> 54 </td> <td><a href="http://lilions.com/roster/DanHillman" target="_blank" > Dan Hillman </td></a> <td> C </td> <td> 6'1 </td> <td> 220 </td> <td> N/A </td> <td> N/A </td> <td> Commack </td> </tr> <tr> <td> 90 </td> <td><a href="http://lilions.com/roster/BrianMcLaughlin" target="_blank" > Brian McLaughlin </td></a> <td> DE </td> <td> 6'5 </td> <td> 250 </td> <td> N/A </td> <td> N/A </td> <td> Marist </td> </tr> <tr> <td> 91 </td> <td><a href="http://lilions.com/roster/ChadEllis" target="_blank" > Chad Ellis </td></a> <td> DE </td> <td> 6'2 </td> <td> 280 </td> <td> N/A </td> <td> N/A </td> <td> Deleware St. </td> </tr> <tr> <td> 99 </td> <td><a href="http://lilions.com/roster/DanEfinger" target="_blank" > Dan Efinger </td></a> <td> DE</td> <td> 6'1 </td> <td> 240 </td> <td> N/A </td> <td> N/A </td> <td> New Hyde Park </td> </tr> </table> </font> <center> <img src="http://lilions.com/home/images/cntbtm2.jpg"></center> <br></br> <center> <table valign="top" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top" class="credit_white1"><font color="#ffffff"><img src="images/spacer.gif" width="30" height="1">Copyright 2011, MajorKillenDesign.com, Inc. All Rights Reserved.</font><br><br></td></center> </tr> </table> <center> <table valign="top" border="0" cellspacing="0" cellpadding="0" width="800" height="2"> <tr> <td width="800" height="2" bgcolor="#D4D601"></td> </tr> </table> <table valign="top" border="0" cellspacing="0" cellpadding="0" width="800" height="15"> <tr> <td width="800" height="15" class="subMenu"><p style="margin-left: 25px; margin-right: 0px; margin-top: 3px; margin-bottom: 5px" align="right"> <i> <a href="http://lilions.com/contact/"> Contact The Lions</a> </i> | <a href="http://majorkillendesign.com/"> Site & Design Sales</a> </p></td> </tr> </table> <script language="JavaScript"> if (document.location.toString().indexOf("home") == -1) { document.write('<table valign="top" border="0" cellspacing="0" cellpadding="0" width="800" height="2"><tr><td width="800" height="2" bgcolor="#D4D601"></td></tr></table>') } </script> </tr> </table></center> </html> Hi there, I'm having a problem with an HTML newsletter. There is a Left Column that is supposed to have a background image that repeats as often as the content on the right demands. Anything you could suggest would be amazing. Here is my code: HTML Code: <style type="text/css"> body { font: 100% Verdana, Arial, Helvetica, sans-serif; font-size:12px; background: #666666; margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */ padding: 0; line-height:125%; text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */ color: #000000; } #container { width: 600px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */ background: #FFFFFF; margin: auto; /* the auto margins (in conjunction with a width) center the page */ border: 1px solid #000000; text-align: left; /* this overrides the text-align: center on the body element. */ } #leftColumn { width: 165px; height: 100%; float:left; background-image: url(http://www.research.legalaid.on.ca/images/BLsidegrey.gif); } #footer { font-size: 12px; line-height: 125%; color: #996600; background-color: #E9F4F5; border: 1px solid #CCCCCC; width: 590px; float:right; padding-left:10px; } #mainContent { width: 435px; float: right; background-color:#FFFFFF; } #textBox { padding-left: 10px; } .thisIssue{ font-weight:bold; color: #cc6600; line-height: 125%; } .date{ font-weight:bold; color: #333333; line-height: 135%; } .authors{ font-weight:bold; color: #333333; line-height:90%; } </style> </head> <body class="oneColFixCtr"> <div id="container"> <img src="http://www.research.legalaid.on.ca/images/BL_fam.gif" border="0" alt="Mainheader" align="middle" /> <div id="leftColumn"></div> <div id="mainContent"> <div id="textBox"> <p><span class="thisIssue">This Issue</span><br/> <!-- TemplateBeginEditable name="Date" --><span class="date">March 28, 2012</span><!-- TemplateEndEditable --><br/> <!-- TemplateBeginEditable name="Authors" --><span class="authors">by: Elizabeth Ramsden</span><!-- TemplateEndEditable --></span> </p> <!-- Top Divider --> <img style="padding-bottom:5px" src="http://www.research.legalaid.on.ca/images/divider.gif" alt="topDivider" border=0 /><br/> <!-- Main Content Goes Here --> <!-- TemplateBeginEditable name="MainContent" --> <p> </p> <!-- TemplateEndEditable --> <p> <!-- Main Content Ends Here --> <!-- Bottom Divider --> <IMG style="padding-top:10px" src="http://www.research.legalaid.on.ca/images/dividerbottom.gif" alt="bottomDivider" border=0><br/> </p> </div><!-- end #textBox --> </div><!-- end #mainContent --> Dont know how to explain this but i have some flash centered in the middle of the screen and i would like to put a image that to the left and right of the centered flash im running at 1024x768, i did seem to manage this but when i tried a higher resolution the flash stopped center and the left and right image kept to the left and far right of the screen when what i wanted is the left and right image to stay flush left and right to the centered flash. Below is my code minus the left and right image, could someone help me add a image to the left and right of the centered flash, so even if the resolution is increased the left and right image will stay flush with the centered flash. HTML 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=ISO-8859-1" /> <title></title> <style type="text/css"> <!-- body { background-color: #000000; } --> </style></head> <body > <table width="770" border="0" align="center"> <tr> <td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="swflash.cab#version=7,0,19,0" tppabs="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="770" height="70"> <param name="movie" value="bombay-logo-top.swf" /> <param name="quality" value="high" /> <embed src="bombay-logo-top.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="770" height="70"></embed> </object></td> </tr> <tr> <td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="swflash.cab#version=7,0,19,0" tppabs="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="770" height="400"> <param name="movie" value="main.swf" /> <param name="quality" value="high" /> <embed src="main.swf" main.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="770" height="400"></embed> </object></td> </tr> <tr> <td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="swflash.cab#version=7,0,19,0" tppabs="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="770" height="100"> <param name="movie" value="time.swf" /> <param name="quality" value="high" /> <embed src="time.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="770" height="100"></embed> </object></td> </tr> </table> </body> </html> i have no idea how to do this. you know how you have a bunch of pictures that are similar, and they are repeated after each other, but are shown as one image. kind of like a flip book, but with and image. mini-slideshow type thing. does this make any sense? hopefully... WAIT! LIKE THIS... HOW DO YOU DO THAT? haha. PLEASE HELP ME!!!! Hi, I'm taking website design at school, and for our final mark we have to design a full website with Dreamweaver cs3. Now i'm stuck on one thing that i cant solve , so please help me out. How do I stop this image (background) from repeating??? Without using CSS & with CSS I've uploaded the site that I'm working on at http://www.bhsolutions.org and here is the code; HTML 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>Sadmir's Website | Home</title> <script type="text/javascript"> <!-- function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> <style type="text/css"> <!-- .style1 { font-size: 30px; font-weight: bold; } .style3 { color: #CC0000; font-size: 18px; } .style4 {color: #3D3C2C} .style6 {font-size: 12px} #apDiv1 { position:absolute; width:316px; height:208px; z-index:1; left: 184px; top: 705px; } body { background-repeat: repeat; } --> </style> </head> <body background="images/resource/background.png" onload="MM_preloadImages('images/navigation/servicesd2.gif')"> <table width="794" height="1089" border="0" align="center" cellpadding="1" cellspacing="1" background="images/resource/background.png"> <tr> <td width="251" height="67" bgcolor="#FCFAE6"><a href="index.html"><img src="images/logo.gif" alt="Sadmir's Website" width="204" height="57" border="0" longdesc="index.html" /></a></td> <td width="98" bgcolor="#FCFAE6">Link A</td> <td width="66" bgcolor="#FCFAE6">Link B</td> <td width="114" bgcolor="#FCFAE6">Link C</td> <td width="210" bgcolor="#FCFAE6">Link D</td> <td width="36" bgcolor="#FCFAE6"> </td> </tr> <tr> <td height="21" colspan="6" bgcolor="#DBD8C6"><marquee scrolldelay="125" width="100%"> <span class="style6"><font color="#800517" >Welcome to Sadmir's Website</span> </marquee> </td> </tr> <tr> <td height="59" valign="top"><a href="services.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Services','','images/navigation/servicesd2.gif',1)"><img src="images/navigation/services.gif" alt="Services" name="Services" width="240" height="65" border="0" id="Services" /></a></td> <td colspan="5" rowspan="3" valign="top"><img src="images/header-img.jpg" width="525" height="238" /></td> </tr> <tr> <td height="66">link 2</td> </tr> <tr> <td height="103">Link 3</td> </tr> <tr> <td height="260" colspan="6" background="images/bodybg.gif" bgcolor="#BEE4FF"><blockquote> <blockquote> <blockquote> <p align="left" valign="top"><span class="style1">Welcome to</span></p> <p><span class="redtext style3">Sadmir's Unique Web Solutions.</span></p> <p align="left" class="style4">Whether you need a static, dynamic web page or a E-Commerce website for your small business, or just want a personal blog or forums website with design that moves at an affordable price, then Sadmir's Unique Web Solutions is the right place for you.</p> </blockquote> </blockquote> </blockquote> <p> </p> </blockquote> <div align="center"></div></td> </tr> <tr> <td height="20" colspan="6"> </td> </tr> <tr> <td height="59" colspan="3" background="images/bodysmall.gif"><blockquote> <div align="center"><strong>Text</strong></div> </blockquote></td> <td colspan="3" background="images/bodysmall.gif"><div align="center"><strong>Text</strong></div></td> </tr> <tr> <td height="259" colspan="3" background="images/bodyleft.gif" valign="top"><p> </p> <blockquote> <p><strong>How do I stop this image (background) from</strong></p> <p><strong> repeating???</strong> ------------------------------------------->></p> <p> </p> <p>Without using CSS & with CSS</p> <p>Thank you</p> </blockquote> <p> </p></td> <td colspan="3" background="images/bodyleft.gif" valign="top"><p> </p> <blockquote> <p><strong>Text</strong></p> <ul> <li>Text</li> <li>Text</li> <li>Text</li> <li>Text</li> </ul> </blockquote> </td> </tr> <tr> <td height="20" colspan="6"> </td> </tr> <tr> <td height="133" colspan="6" background="images/footerbg.gif" bgcolor="#FCFAE6"><div align="center">Footer</div></td> </tr> </table> </body> </html> Thank you I am trying to have a non repeating background in my table. My table is inside a DIV tag. It works perfect in Mozilla Firefox but not in internet explorer. I know someone on this forum had a similar problem awhile ago but I couldn't seem to fix my problem. I am not the best at coding. This is what I have <table width="800" border="0" align="center" cellpadding="0" cellspacing="0" style="background:url(assets/blob2.png)no-repeat"> Any help would be greatly appreciated Hello, I hope someone here can help, I am the webmaster for a youth football website. We have about 50+ pages on the site, and they are all referenced from a drop-down menu at the top of each page. The code looks like this HTML Code: <ul class="level-0" id="cssmw"> <li><span><a href="teams.html">Teams</a></span> <ul class="level-1"> <li><span><a href="under8s.html">Under 8's</a></span> <ul class="level-2"> <li><span><a href="under8sbmouth.html">B'mouth League</a> </span></li> </ul> </li> </ul> </ul> However, this coding on my site runs for about 70 lines, and should I wish to change a part of it, I have to edit the code on every page. Is there any way of referencing html code from a document and using it in place of the code on each page? Looking forward to your suggestions, Cheers, Ed Rogers I would like to put an image as a background image in a data cell to prevent unauthorized copying (or help prevent thereof). However, when I do this the image begins to repeat itself if the data cell is slightly larger than the image specs. The images are located here at www.gabegarcia.com All images on the left side of the pages is what I would like to make background images without the repeat. What would I have to add to accomplish this? Hi all -- I'm having an interesting problem. I'm designing a web page that has a navigation banner (home - programs - schedule of events - contact us - downloads) that is made up of a .png for each page (i.e. home.png, programs.png, etc). My page is 1000px wide and all of the navigation banner's images add up to 1000px wide. I'm using JavaScript to create an onMouseOver and onMouseOut effect on each of the images. The problem that I'm having occurs when I tried to add a link (either by <A HREF= or using an image map). Whenever I add a link to the image, a small (3px) area of white space shows up to the right of the image. This shifts all of my other images 3px to the right (and 3 more for each link I add to subsequent images) thus making the total width of the navigation banner over 1000px and the last image gets shoved to a new line. I can find no way to get rid of this white space other than to remove the link from the image. There is no property on the page that adds any sort of padding, margins, or borders to images or links, so I can see no property that has to be changed. Help! How do I get rid of this white space but still keep the link on the image?? [I posted this question on the Adobe forum to no avail, below is a screencap I took of the issue I'm having] Thanks in advance! //kl PS - I am using both IE8 and Chrome to view this webpage. I've set all the margins/padding/borders to 0px. Here is my CSS and the part of the code that pertains to the navigation banner. CSS: Code: <style type="text/css"> <!-- body { font: 100% Verdana, Arial, Helvetica, sans-serif; background: #666666; margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */ padding: 0; text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */ color: #000000; background-image: url(images/blue.bg.png); background-repeat: repeat; background-color: #009; } .oneColFixCtr #container { width: 1000px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */ background: #FFFFFF; margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */ border: 0px solid #000000; text-align: left; /* this overrides the text-align: center on the body element. */ } .oneColFixCtr #mainContent { padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */ } body, td, th { color: #333; } #main_banner2 { margin: 0px; padding: 0px; height: auto; width: 1000px; } --> </style> </head> Nav Banner: NOTE:: below HAS to be all one paragraph because if i insert a carriage return in between images, it also adds the white space... Code: <body class="oneColFixCtr"> <!-- MAIN NAVIGATION BANNER --> <!--HOME--><img src="images/nav/home.png" alt="home" name="home" width="82" height="30" border="0" onMouseOver="document.images.home.src='images/nav/home_over.png'" onMouseOut ="document.images.home.src='images/nav/home.png'"/><!--PROGRAMS--><img src="images/nav/programs.png" width="111" height="30" border="0" name="programs" onMouseOver="document.images.programs.src='images/nav/programs_over.png'" onMouseOut ="document.images.programs.src='images/nav/programs.png'"/><!--SCHEDULE OF EVENTS--><img src="images/nav/scheduleofevents.png" width="189" height="30" border="0" name="scheduleofevents" onMouseOver="document.images.scheduleofevents.src='images/nav/scheduleofevents_ over.png'" onMouseOut ="document.images.scheduleofevents.src='images/nav/scheduleofevents.png'"/><!-- CONTACT US--><img src="images/nav/contactus.png" width="119" height="30" border="0" name="contactus" onMouseOver="document.images.contactus.src='images/nav/contactus_over.png'" onMouseOut ="document.images.contactus.src='images/nav/contactus.png'"/><!--DOWNLOADS--><i mg src="images/nav/downloads.png" width="267" height="30" border="0" name="downloads" onMouseOver="document.images.downloads.src='images/nav/downloads_over.png'" onMouseOut ="document.images.downloads.src='images/nav/downloads.png'"/><!--FACEBOOK--><im g src="images/nav/facebook.png" width="90" height="30" border="0" name="facebook" onMouseOver="document.images.facebook.src='images/nav/facebook_over.png'" onMouseOut ="document.images.facebook.src='images/nav/facebook.png'"/><!--TWITTER--><img src="images/nav/twitter.png" width="67" height="30" border="0" name="twitter" onMouseOver="document.images.twitter.src='images/nav/twitter_over.png'" onMouseOut ="document.images.twitter.src='images/nav/twitter.png'"/><!--BLOGGER--><img src="images/nav/blogger.png" width="75" height="30" border="0" name="blogger" onMouseOver="document.images.blogger.src='images/nav/blogger_over.png'" onMouseOut ="document.images.blogger.src='images/nav/blogger.png'"/><img src="images/home_banner.png" alt="home_border" width="1000" height="7" /><br /> So in January 2006 I posted a question about "making two buttons in one" 3 years and 5 months later i am happy to announce that I have found a solution. Ok, so no I have not spent the last three years looking, but the need for one came around again yesterday so I revisited the project. All I needed was "simple" image toggle. Image 'A' click it once it changes to image 'B' click it again it changes back to image 'A' All the "image toggle" codes I could find were extremely complex. I thought I had finally found one, it wasn't perfect, but it was the smallest and most basic thing I could find. HTML Code: <html> <head> <style type="text/css"> .on {background-image:url(playlist_btn.png); background-repeat:no-repeat;} .off {background-image:url(playlist_btn_x.png); background-repeat:no-repeat;} </style> <script language="javascript"> function togglestyle(el){if(el.className == "on") {el.className="off";} else {el.className="on";}} </script> </head> <body> <div id="onoff" class="playlist_btn"><img src="blank.gif" width="50 height="50" onclick="togglestyle(onoff)"></div> </body> </html> I tested it, it worked, so I considered problem solved. I placed it in my page and nothing. Turns out it wont work with a doc type - so it's useless. Other problems, I'm not big on using "blank gif's" unless I have to, if you want multiple image toggles you need a new JS function for each one, and two lines of css as well. And, though I rarely use image rollovers anymore, it would certainly not be possible in this method. So it was back to the drawing board. Well, I had actually already found the solution a few minuets prior to finding out that the above code is so good. I had coded a button that on rollover shows a tooltip, when you click the button, the text in the tool tip, changes, chick again and it reverts. All done with a simple showHide javascript function, that i am finfing out has many uses. here is the awesome code: Code: function showHide(elementid){ if (document.getElementById(elementid).style.display == 'none'){ document.getElementById(elementid).style.display = ''; } else { document.getElementById(elementid).style.display = 'none'; } } function hideShow(elementid){ if (document.getElementById(elementid).style.display == ''){ document.getElementById(elementid).style.display = 'none'; } else { document.getElementById(elementid).style.display = ''; } } I wont take credit for the showHide code, but I will take credit for the hideShow portion, obviously a monkey could have coded the revers, but iot does make it that much more universal. As the original code was designed to show something that was hidden, add the revers to hide something that is showing and it's perfect. Now I will take a moment to say, though I have yet to find a problem with the code, it seems to work in most browsers, firefox, ie, safari, and validates for WC3 - In sure it has it's flaws. Until now, to show and hide divs I had used the MM_showHideLayers JavaScript function, which by default used the visibility style. It is of course a good script, and has many uses, it's not very big, but it is somewhat complex. The other thing to think about is that invisible objects still take up space. That's what is cool about the display:none: style, is that is not only invisible but it doesn't take up space. So here is how I used the above to JavaScript to make a simple onclick image toggle: HTML Code: <img id="on" src="on.png" width="50" height="50" onClick="javascript:hideShow('on'); javascript:showHide('off')" alt="on"> <img id="off" src="off.png" width="50" height="50" onClick="javascript:hideShow('off'); javascript:showHide('plus')" style="display:none;" alt="off"> Cool huh? Now this example does not have a rollover either, but since it uses to individual images and is not replacing one image wioth another you could easily apply a rollover to both images. But, hold on, look at the above code, isn't that essentially a rollover? Change the first onClick to onMouseOver and the second to onMouseOut and look at that a 'brand new' method for mouseovers. So lets take a look at this for a second, and compare MM_swapImage to this new hideShow method. As far as CSS rollovers I definitely prefer them to the MM_swapImage method, as they use a minimal amount of code. However they actually take a lot of math, construction the buttons is somewhat tedious, because css buttons use 1 image and change it's position, to work well you have to use a "blank.gif" and the the css can really add up if you have a lot of buttons: Also, you can't go directly to a button in the document, you have to fish through the css to make any adjustments. But they are fast, they don't need to be preloaded and... they are pretty cool. But anyway, swapImage and hideShow... The left is the MM_swapImage method. Now when you use the swapImage js you also have to use MM_swapImgRestore, MM_findObj, MM_preloadImages. You don't have to use the preload script but it does make thing work faster... supposedly, but that requires a onload script in the body tag, and if you have a lot of rollovers your body tag can get really long really quick. So what are the advantages, well we know for sure it works, and you only need on image in the document, however actualy having the image you are "swapping" too actually in the document can add functionality. So as you can see, on the right, the showHide method is, in total code, much smaller. True you do need to use two images, so the total code in the body is longer but, it's more than evened out bu the minimal JavaScript, and I think it's worth it. You don't need to use a preloader, you have full control over both images, the up and over state, and unlike the swapImage method, though it's rare you would need to, your up and over images can actually be different sizes, which is kind of cool. So here's the basic code for a rollover: HTML Code: <img id="up" src="up.png" width="50" height="50" onMouseOver="javascript:hideShow('up'); javascript:showHide('over')" alt="up"> <a href="http://google.com"><img id="over" src="over.png" width="50" height="50" onMouseOut="javascript:hideShow('over'); javascript:showHide('up')" style="display:none;" alt="over" border="0"></a> To add a link the button you just apply it to the "over state" image. And unlike swapImage, though it is overkill, you can also add a "downstate" image quite easily. So, back to the on/off button here is how you would code it using showHide with rollovers. HTML Code: <img id="on" src="on.png" width="50" height="50" onMouseOver="javascript:hideShow('on'); javascript:showHide('onover')" alt="on"> <img id="onover" src="on_over.png" width="50" height="50" onMouseOut="javascript:hideShow('onover'); javascript:showHide('on')" onClick="javascript:hideShow('onover'); javascript:showHide('offover')" style="display:none;" alt="onover"> <img id="off" src="off.png" width="50" height="50" onMouseOver="javascript:hideShow('off'); javascript:showHide('offover')" style="display:none;" alt="off"> <img id="offover" src="off_over.png" width="50" height="50" style="display:none;" onMouseout="javascript:hideShow('offover'); javascript:showHide('off')" onClick="javascript:hideShow('onover'); javascript:showHide('off')"alt="offover"> So here is what is going on: you have the upstate on.png image, when you mouse over it on.png is hidden and on_over.png is displayed. When you click on_over.png it is hidden and off_over.png is display, mouse off it and off.png is displayed. Make scene? Now be aware, when you click, you are also in a scene "mousing off" so some flickering can occur. Firefox handles everything pretty well, IE and Safari not so much. When you click the on_over.png the click tells it to hide on_over.png and show the off_over.png, at the same time the mouseoff tells it to hide on_over.png and show the on.png. So fortunately the toggle with rollovers isn't perfect, but perhaps some more tweaking of the code or maybe, in this case swapImage would work better to do the rollovers... But all in all I'd say its a solid concept. If you feel compiled to do so, reply with any comments, concerns or flaws you see. Hey guys. I need a little help with my HTML image rotator. Everything works fine, except the images don't show up on the right slide. All 4 images show up on the first slide. I can't figure out what's wrong. Any help will be greatly appreciated. Code: <!DOCTYPE html> <html> <head> <title>...</title> <style> #sliderwrap { height: 403px; } #sliderleft { width: 10px; height: 100%; float: left; background: #efefef; border: 1px solid #ccc; } #sliderleft div { height: 100px; border-bottom: 1px solid black; } #slidercontent { position: relative; width: 650px; height: 100%; float: left; border: 1px solid black; overflow: hidden; } #sliderimages { position: absolute; -webkit-transition: all .5s ease-in-out; -moz-transition: all .5s ease-in-out; -ms-transition: all .5s ease-in-out; -o-transition: all .5s ease-in-out; transition: all .5s ease-in-out; } #sliderimages img { display: block; } .s0 #slide0, .s1 #slide1, .s2 #slide2, .s3 #slide3 { background: #ccc; } .s0 #sliderimages {top: 0 } .s1 #sliderimages {top: -500px} .s2 #sliderimages {top: -1000px} .s3 #sliderimages {top: -1500px} </style> <script> var slide = 0; var interval_id = 0; function stop_timer() { clearInterval(interval_id); if (this.getAttribute("data-slide")) { slide = parseInt(this.getAttribute("data-slide")); document.getElementById("sliderwrap").className = "s" + slide; } } function start_timer() { clearInterval(interval_id); interval_id = setInterval( function() { slide = (slide + 1) % 4; document.getElementById("sliderwrap").className = "s" + slide; }, 3000 ); } window.onload = function() { start_timer(); var el = document.getElementById("slidercontent"); var divs = document.getElementById("sliderleft").getElementsByTagName("div"); for (var i = 0; i < divs.length; i++) { divs[i].onmouseover = stop_timer; divs[i].onmouseout = start_timer; } el.onmouseover = stop_timer; el.onmouseout = start_timer; } </script> </head> <body> <div id="sliderwrap" class="s0"> <div id="sliderleft"> <div id="slide0" data-slide="0"></div> <div id="slide1" data-slide="1"></div> <div id="slide2" data-slide="2"></div> <div id="slide3" data-slide="3"></div> </div> <div id="slidercontent"> <div id="sliderimages"> <img src="http://i.imgur.com/8iWz6.jpg"> <img src="http://i.imgur.com/1d2U6.jpg"> <img src="http://i.imgur.com/8iWz6.jpg"> <img src="http://i.imgur.com/1d2U6.jpg"> </div> </div> <div style="clear: both;"></div> </div> </body> </html> the title makes it sounds really confusing. Ok im making my first website, and i need help with a code, (as you can see on www.dalekblaster.co.uk) i have got a section at the top where the images change from one to another. The code is - HTML Code: // Set slideShowSpeed (milliseconds) var slideShowSpeed = 5000; // Duration of crossfade (seconds) var crossFadeDuration = 5; // Specify the image files var Pic = new Array(); // to add more images, just continue // the pattern, adding to the array below Pic[0] = 'http://www.dalekblaster.co.uk/images/banner/dalekblasternexttime.jpg' Pic[1] = 'http://www.dalekblaster.co.uk/images/banner/dalekblaster2.jpg' Pic[2] = 'http://www.dalekblaster.co.uk/images/banner/dalekblastersjanexttime.jpg' Pic[3] = 'http://www.dalekblaster.co.uk/images/banner/dalekblaster.jpg' // do not edit anything below this line var t; var j = 0; var p = Pic.length; var preLoad = new Array(); for (i = 0; i < p; i++) { preLoad[i] = new Image(); preLoad[i].src = Pic[i]; } function runSlideShow() { if (document.all) { document.images.SlideShow.style.filter="blendTrans(duration=2)"; document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"; document.images.SlideShow.filters.blendTrans.Apply(); } document.images.SlideShow.src = preLoad[j].src; if (document.all) { document.images.SlideShow.filters.blendTrans.Play(); } j = j + 1; if (j > (p - 1)) j = 0; t = setTimeout('runSlideShow()', slideShowSpeed); Now i need help because, i want to link each picture on the slideshow to a differnet page or external site, but im not sure how. (but so they can go to different pages not the same one) can anyone help me? I'm not sure if this is an IE issue, css, html... I have all icons and images showing a broken image" red X OVER the actual image? I've never seen this on any other sites or even on any other sites i've done. They are all .png images but I use .png files successfully all the time? Anyone encounter this? Here's the HTML surrounding the image file: HTML Code: <div class="header logo2"> <!-- Logo begins here --> <a href="index.php" title=""><img src="images/logo.png" alt="" /></a> </div> <!-- END Logo --> Here's the CSS surrounding the image with no other images or backgrounds being called??? HTML Code: .header { height: 41px; } .logo2 { text-align: right; } See Image Attached... Can we place an image just right to an image having the style float:left? If so how? I tried keeping but the second image was coming below the first image. <td colspan="4"> <img src="images/Subject.gif" style="float: left" /> <b>Subject - Craig TestFile</b> <img src="images/dot.jpg" class="imageUnderLine" /> </td> Also the is there any way to remove the spaces that come in between when we use <hr> tag? For example if we write test<hr> the seperator drawn is after a line break with text. How do I put another image (websiteheader2.jpg) that will be placed before the current image (websiteheader1.jpg), into this code: #logo-div { background-image:url('http://website.com/ websiteheader1.jpg') !important; background-repeat:no-repeat !important; background-position:10px 60px !important; } Hi I am wondering if there is a way to create a composite image of different images in a website folder? So if I have a folder with image01.png, image02.png, image03.png, is there a way (on a website) to take those three images and create on composite image out of them, and then maybe place this new image in another folder? I don't want to use Flash. Thanks for your time and help. Shaun Hi there, Hoping I can explain my situation without having to post an example. I have a logo, which I want to be centred... Easy enough. However, on the left of the text for the logo, there is an image, which kind of overlaps the text (imagine someone holding there arm out straight across top of text, and the person is fat lol). My predicament is this... If I leave the person as a part of the original logo, the font isn't centred and does look kinda odd with the rest of the page. So what I'd like to do is have the text centred, and have the person to the left, without affecting the centre of the text. Although I will need the person on the left to be close enough to the text to look like the complete logo. Also, might be worth me mentioning, the person on the left is taller than the font, and so I'd like the text to be in the midle of them (say waist height). Anyone understand me or am I gonna have to post up an example? lol Cheers Ps, I think I've done something similar in XML and CSS using just text, but never with an image, and don't really remember it too well anyway. Can you make an Image be transparent, like in photoshop? (see image attached) I want to make the white space in my top banner transparent so that you can see the background image below it. |