[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

XHTML and table cell background images

Posted on 2006-07-13
4
Medium Priority
?
3,477 Views
Last Modified: 2008-01-09
<td background="some-image.jpg"> fails the w3c test but it works in most browsers. I tried changing it to an inline style and then in an external stylesheet and set repeat-y but the page layout was messed up.  Is <td background= just a fail for strict xhtml, does it pass a lower level test?
0
Comment
Question by:ncw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 11

Expert Comment

by:walkerke
ID: 17109517
All style elements should be moved to the style attribute for w3c compliance. Try this:

<td style="background-image: url(some-image.jpg);">

This should work and is w3c compliant. If that doesn't produce what you expect, is it available on the web for me to view?
0
 
LVL 1

Author Comment

by:ncw
ID: 17109683
I'm familiar with the style you have given, but there seems to be a problem when used inconjunction with the <img> tag inside a table cell. What I'm trying to do is to display an image (inside ing tags in the cell) and then continue with the background image for the remainder of the cell height below the main image. 'background=' handles this ok but not css.
0
 
LVL 11

Accepted Solution

by:
walkerke earned 1000 total points
ID: 17110578
Is your page posted so that I can view it? I'm not sure what you mean. If you want the background to repeat, you should include that property:

<td style="background-image: url(some-image.jpg); background-repeat: repeat;">

If you only want it to repeat vertically, set the value to "repeat-y".
0
 
LVL 1

Author Comment

by:ncw
ID: 17113908
You're absolutely write .... it worked today, don't know what was wrong yesterday!

Just left with once validation error where I've used a name property in an image tag to do a rollover.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question