HTML - Can I Background-repeat A Different Image/color From The Initial One?
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. 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 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 Hi, I want to change the background color of my textbox on focus and change it back to white on onblur event. Issue: When i change the back ground color for text box on focus it properly changes it. But when i leave the focus from textbox border color for text box is impacted and its changed to white. Please help so that border color for textbox is not impacted only background color should change here is the sample code <code> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <p> <input name="text1" type="text" id="text1" value="textbox 1" onfocus="this.style.background ='#cad5df'" onblur="this.style.background='white'"> </p> <p> <input name="text2" type="text" id="text2" value="textbox 2" onFocus="this.style.background = 'yellow'" onBlur="this.style.background='white'"> </p> </body> </html> </code> I am trying to create a frame for a page content as shown in the attachment. As you can see, each column has a pilaster (background which is not repeated) and actually a column which is repeated. Generaly I want to create a code which would work for a content of any length, so I want the columns to be repeated as many times as it is required automatically. Here is what I tried to do. Of course, this does not work, otherwise I wont ask Do you have Ideas how to make it working? HTML Code: <table cellpadding=0 cellspacing=0 border="0"> <tr> <td colspan=3 style="background-image:url('top_beam.jpg');background-position:bottom;background-repeat:no-repeat;"> </td> </tr> <tr> <td style="background-image:url('left_pilaster.jpg');background-position:right;background-repeat:no-repeat;"> </td> <td rowspan=2> ACTUALLY THE CONTENT </td> <td style="background-image:url('right_pilaster.jpg');background-position:left;background-repeat:no-repeat;"> </td> </tr> <tr> <td style="background-image:url('left_column.jpg');background-position:right;background-repeat:repeat-y;"> </td> <td style="background-image:url('right_column.jpg');background-position:left;background-repeat:repeat-y;"> </td> </tr> <tr> <td colspan=3 style="background-image:url('brick_floor.jpg');background-position:top;background-repeat:no-repeat;"> </td> </tr> </table> Hello all! Does anybody noticed that font colors are treated as background color while printing in IE? I just set a <font color=#f0f0f0>MY TEST</font> or <span style="color: #f0f0f0">MY TEST</span> and, on screen, it's OK. On print preview, it goes black. I can print in grayscale only if I turn "print background images and colors" on. Does anybody has a workaround on it? It will be a watermark, so it should be printed in grayscale. I dont think I'm setting a background color, specially on first example (color of the font). Thanks! hey everyone - im really not a scripter i only do designs, but i wanted to know if its possible to repeat an image that is not set as background like in a table? thanks alot! x Hi all, I'm new here and was hoping I could get some help. I am trying to make an image repeat right next to a first image. Example: img1, img2, img2, img2, img2, img2, img2, img2, img2, ..... Here's a better example using the drupal logo. Say I needed to place this image at the top of my page: and needed this one to go on the right of the first image and repeat over and over (Horizontal only to the end of the page): Any help is greatly apreciated, thanks in advance Yeah, it's probably a real simple question but it's bugging the heck out of me. I'm trying to design my first layout (hence why it looks so simple), but it's not working out. Here's the layout: http://www.lifeschronicles.net/index_test_brown.html I want the content boxes (pale brown) to run all down the page. How do I do that? Please help. Edit: Ok I have finally realised what I need to do. So simple! Haha. Can ignore/delete this thread if you want to. Sorry guys! I'm just wondering how I can find the code to change for the background color of my site. Someone else designed it, and they have left the project so I can't ask where it is. Here is the index.html file, where I'm guessing I should be able to find the place to change it (?) <!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>Baller Magazine</title> <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script> <link href="baller.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> <!-- 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_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_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];} } //--> <!-- function openwin() { window.open('http://www.goodglobalgames.org/js/', 'win','width=870,height=700,status=no,scrollbars=yes,directories=no,menubar=no,resizable=no,toolbar= no'); } // --> </script> <script type="text/javascript"> <!-- function openwindow() { window.open("contact.html", "", "width=600,height=650"); } // --> </script> <SCRIPT SRC="select.js" LANGUAGE="javascript"></SCRIPT> <style type="text/css"> <!-- .style4 {color: #FFFFFF} --> </style> </head> <body onload="MM_preloadImages('images/head-o_05.jpg','img/defblog2.1-o.jpg','img/signup-o.gif')"> <div style="width:940px; margin: 0 auto;"> <table border="0" cellpadding="10" cellspacing="0" style="margin:0 auto; width:940px;"> Or is it in the css stylesheet? I would appreciate any help someone out there can provide. Thank you So I'm rather rusty with html and building a low budget site. At www.cccathens.com I have a background image set to a particular width well at www.cccathens.com/about_us I'm not using the same background image. But I would like the same look as far as having the white on each side. Is there a way to set the background color of the page so it has the same effect? Thank you, Todd Hello eveybody, I have a question i am fairly new to the HTML scene. I am opening up an online store and have purchased volusion as my shopping cart. I wanted to change the background to a different color, but i just want the background not the entire background even the layout that is in front of the background is changing. I have gone into the css file to change it and it is not what i am looking for. Can anyone out there give me some advice on how to do this. I hope i made myself clear on what i am asking for. If not feel free to let me know and i will elaborate more. Thank you How can I toggle the background-color of a div onclick? For example, I have a div that has a background color of #EEE. I would like this to change to #2E6DCC when I click on the div, and change back to #EEE when I click again. I am having difficulty though, as I seem to be only able to change the #EEE to #2E6DCC, and not change it back onclick. Any kind of help would be very appreciated. Here is my JavaScript : Code: function colortog(ele) { if (document.getElementById(ele).style.backgroundColor = "#EEE") { document.getElementById(ele).style.backgroundColor = "#2E6DCC"; } else if (document.getElementById(ele).style.backgroundColor = "#2E6DCC") { document.getElementById(ele).style.backgroundColor = "#EEE"; } else { document.getElementById(ele).style.backgroundColor = '#EEE'; } } My webpage is centered, the unused side panels (underlying background) are mid-grey. I would like them white but cannot remember what the code is, or is it CSS which I do use Thanks <IFRAME SRC="leo.html" margin="0" FRAMEBORDER="0" style="background-color: black;" NAME="main" width="790" height="480" scrolling="--"></iframe> When I load just a picture into the frame, just simply a jpg as a link into the frame the background is black in mozilla/ff but white in IE? Any suggestions? Thanks, Leo I want to rebuild a website, and I want to have a button that gives people the option of three background color choices. How can I do that? This is a coursework assignment. i've noticed on some website it gives you the option to change the color of the background too a high contrast version. is this possible without using Javascript? (html5 ideally). Obviously i'm not expecting someone to tell me what to do but a link in the right direction would be nice please Hello, Is there any way to get a background color to a table cell that's translucid (i.e. half transparent/faded)? I have a general background to the body of the page and it remains fixed while the page itself scrolls (so I can't just created a darkened JPG for the table cell background). Any suggestions? Hi, i want the background color of a div to only span a percentage of the div. For example HTML Code: <div style="width: 90%; padding: 1%; background: green;">50%</div> But i only want the green background colour to span the percentage (in this case 50%) of the div. Is this possible, and if so can somebody point me in the right direction? Thankyou. How would I add a background color to the sides of my web page? I know how to add a background color in css, but I would like to only add it to 20% on the left and 20% on the right with 60% left for content in the middle. Is this possible? |