HOW?
Why doesn't this work?
I would be extremely helpful for any advice!Code:<td style=\"width: 98%; background-image: url(/images/middletop.png); background-repeat: repeat-x;\">blah</td>
| SitePoint Sponsor |
HOW?
Why doesn't this work?
I would be extremely helpful for any advice!Code:<td style=\"width: 98%; background-image: url(/images/middletop.png); background-repeat: repeat-x;\">blah</td>
Mattias Johansson
Short, Swedish, Web Developer
Buttons and Dog Tags with your custom design:
FatStatement.com





Link?
Does your browser support the PNG format? Most do not.
Have you tried looking at the spec for background? Make sure your code is correct.
Adobe Certified Coldfusion MX 7 Developer
Adobe Certified Advanced Coldfusion MX Developer
My Blog (new) | My Family | My Freelance | My Recipes
Why do you have the \" \" in your code? Take those out and your code will work.


The \" is used in php is this part of a php script???
body { background:#000000; color:#000000 }
HEY, WHO TURNED OUT THE LIGHTS?!?
Easy come easy go!!!
CryingWolf
The code is indeed PHP. The \" are just to escape the quotes, so that PHP doesn't parse them. Anyway, looking at the CSS reference for background-image at w3schools, I cant see anything wrong with my code! This is how it's supposed to look:
Maybe it simply doesn't work to put backgrounds in cells? I may need some workaround.Code:body { background-image: url(stars.gif); background-color: #000000 }
Last edited by M. Johansson; Jul 5, 2001 at 03:30.
Mattias Johansson
Short, Swedish, Web Developer
Buttons and Dog Tags with your custom design:
FatStatement.com
I see (didn't realize you were doing this in php). However, it is valid to use a background image in a <td> cell (I use it on my site).
Your code looks right, however, why don't you try putting the css into <style></style> tags in your header and calling that cell background color using a class. For example:
<style type="text/css">
.myCell {
background-image: url(/images/middletop.png);
background-repeat: repeat;
}
</style>
<td class="myCell">whatever you want</td>
I don't know why it doesn't work your way, but when I tested it out using both methods, only calling the background by class worked![]()
Hope this helps
Cory - it worked!
I entered it into my external stylesheet, and it worked. How wierd. A bug in CSS, perhaps? Ah, no matter - the coding looks better with everything in a separate stylesheet anyway.
Mattias Johansson
Short, Swedish, Web Developer
Buttons and Dog Tags with your custom design:
FatStatement.com
Yes, probably something to do with the way the browser renders the css. Glad to see it works (finally!)
Bookmarks