Forum Moderators: open
CSS is your friend on this one:
<table style="background: url(/images/image.gif) no-repeat #efefef;">
Above is the CSS background shorthand format, where you can set all backgroound properties at once. It can also be done the long way:
<table style="background-image: url(/images/image.gif); background-repeat: no-repeat; background-color: #efefef;">
You can replace no-repeat with repeat-x or repeat-y to make it tile in either direction.
Have fun!
Sure, CSS can help you there too. To fix the bg in place, you will use yet another background property:
background-attachment: fixed;
...and to make the cell scroll, use the overflow property:
overflow: scroll;
Here is an example(using shorthand):
<td style="background: url(path) fixed no-repeat #efefef; overflow: scroll;">
Cheers!
<td colspan="7" rowspan="5" valign="top" style="BACKGROUND: url(images/layout_20.gif) no-repeat left top; background-color: #868686; overflow: scroll"></td> which also didn''t work..
<td colspan="7" rowspan="2" align="justify" valign="top" style="padding:10px; BACKGROUND: url(images/layout_18.gif) no-repeat left top; text-transform: uppercase; background-color: #868686; text-shadow: 3px 3px 5px red;"> But the last part doesn't work (also tried text-shadow: Black;). Thanks for the help!
The W3C website has a browser test at the bottom of this page:
[w3.org...]
IE (since version 4) has a proprietary shadow filter that does something similar:
[msdn.microsoft.com...]
If you want cross-browser text shadows for Safari, IE, Gecko browsers and Opera, you will need to do some hacking. Here's one hack I found at:
[workingwith.me.uk...]
/* default setup that everything sees */
.shadow {
/* needed for Internet explorer */
height: 1em;
filter: Shadow(Color=#666666,
Direction=135,
Strength=5);/* Needed for Gecko */
line-height: 2em;
white-space: nowrap;
}/*
* used by browsers which know about
* :before to create the shadow
*/
.shadow:before {
display: block;
margin: 0 0 -2.12em 0.15em;
padding: 0;
color: #666666;
}#shadow_1:before {
content: 'In shadow';
}
#second_2:before {
content: 'Happy Shadowing!';
}/*\*/
html*.shadow {[color:red;/* required by Safari
* so that [] is correctly
* begun. associated with
* the property, yet hiding
* it. Seen by IE6 *//*
* seen by IE6 and Safari, but hidden
* from Gecko
*/
text-shadow: #666666 5px 5px 5px;]color:auto; /* resets color for IE6 */
}/**//*
* end hack using dummy attribute selector
* for IE5 mac
*/
.dummyend[id]{clear: both;}/*\*/
html*.shadow:before {[color:red;/* required by Safari.
seen by IE6 *//*
* seen by IE6 and Safari, but hidden
* from Gecko
*/
display: none;]color:auto; /* resets color for IE6 */
}/**//*
* end hack using dummy attribute selector
* for IE5 mac
*/
.dummyend[id]{clear: both;}
In the example above, the html which I used to get the text shadowed across all browsers was <p class='shadow' id='shadow_1'>In shadow</p>. Whenever you're adding shadowed text to your pages using this technique, ensure that you add a relevant id, and duplicate the text of the shadow into your style sheet.
I tried that class and id but it doesn't work here.