Help Adding Background Image To Table In Xhtml Page

free web hosting
Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > CSS (Cascading Style Sheets)

Help Adding Background Image To Table In Xhtml Page

delivi
I want to add a image as background of a Table in a XHTML page, I did a page validation at http://validator.w3c.org.

It showed the folloeing error for table
CODE
"there is no attribute "background".
...0" cellspacing="0" border="0" background="img/main.jpg">


and for TD
CODE
there is no attribute "background".
<td width="100%" background="img/toplogobg.jpg">


Please help me how to add the image as background to the table. Please help me.

Reply

Saint_Michael
in your css file ad the following.

CODE

background: url("navbar.jpg"); background-repeat: no-repeat;


XHTML no longer supprts backgrounds so you must use a css file to show a background image.

Reply

delivi
thanx Saint_Michael your solution has worked. I cread different class names for each image i wanted to appear in different tables and that worked.

Thanx once again.
This is the reason I love Trap17.

Reply

Saint_Michael
No problem delivi and remember vote me president of the world in 2035 laugh.gif. Topic solved and topic closed.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. xhtml background img url code - 186.46 hr back. (1)
  2. inserting css background image in a table - 299.46 hr back. (1)
  3. xhtml adding backgrounds - 316.32 hr back. (1)
Similar Topics

Keywords : adding background image xhtml

  1. Problem Aligning In Firefox - Problem aligning an image in Firefox. (9)
  2. Link Image Css Bug In Firefox - Can anyone help me? (7)
    I have a problem in a site I am creating. I have styled my post content links in the following
    way. CODE #post-content a {     background-color: #bf6f3c;     color: #fff;
        padding: 2px 2px 1px 2px;     border-bottom: 1px solid #7f4926; } #post-content
    a:hover {     color: #f5fac7; } And when I insert an link image like so: There
    seems to be an extra border inherited from my #post-content a style. I have attached the screenshot
    to show the problem. This was how my link image should look like: CODE #post-content a img { ...
  3. Centering A Div Containing Image. - I have a logo I need centered in a aujustable width page (9)
    http://sonesay.trap17.com/sonesayi/ Just a new layout I'm working on, Any ideas how I can get
    the logo to be centered? At the moment I can only float it left or right. I think is possible to get
    it done in tables but I would prefer to stay away from them in layouts. Any insight appreciated. by
    the way source code and css is at http://sonesay.trap17.com/sonesayi/index.html
    http://sonesay.trap17.com/sonesayi/main.css thanks ...
  4. Adding Accessibility Features To Your Pages - Using the :active/:focus pseudo-class (0)
    Here is a tip for its use on your site. Using CSS to tell your visitors where they are on your site
    can be fairly complicated depending on the method you use. The CSS Specifications have defined a
    "pseudo-class" for the link which currently has 'focus' and another pseudo-class for the
    'active' state. They can be used to tell your visitors where their cursor is on the page
    and you do that be altering the CSS for the link which currently has the focus and those which are
    being activated. The ' active' state only occurs momentarily while the ...
  5. Another Kind Of Css Background Float Trouble - now with a <ul> (8)
    How'd you manage to post a topic with no real content? /blink.gif' border='0'
    style='vertical-align:middle' alt='blink.gif' /> ...
  6. Centering Background Image In Css - (8)
    Well, the title says what I need. Basically, I want a background image that can be used in the body
    or inside a div (or table), which is centered....
  7. Css Image Replacment - using CSS to change the image path (5)
    I was wondering if it is possable to change the path to an image using CSS, so that I could provide
    a sort of template system rather then having to change a bunch of thing I could have astandard page
    and then by changing the external CSS I could change not only styles but the whole image, I soo how
    I could change the background-color { url(image.gif)} but whatabout an actual image say change the
    src of an img tag?...
  8. Css Floating Trouble - cant get a background color (15)
    I want #nav_info to have a background color CODE div#nav_info         {background:#000055;
    color:black;} div#nav_info p#breadcrumb    {float:left;} div#nav_info p#date
      {float:right;} But it doesnt show the background like i want, and id like to avoid as
    much as i can nesting into another div, does any body know how can i do this? If i put each
    paragraph a background color, it only shows for the part of the text they actually occupy in their
    own space, it leaves white areas between them... This is the xthml: HTML div id =" nav_info
    ">...
  9. Css Image Position Problem - align image left or right (1)
    I am having problems figuring out why my image will not align how I want it. Here , you can see
    that the image is aligned to the left. This is the code for that block: CODE <a
    href="http://img355.imageshack.us/img355/844/r25870774779uu.jpg"><img
    src="http://img355.imageshack.us/img355/844/r25870774779uu.th.jpg" alt="bush
    bathroom break note" align="left" style="margin-right:
    5px;"></a>[text goes here] But if you go here , you can see that the
    text does not stay to the right of...



Looking for Help, Adding, Background, Image, To, Table, In, Xhtml, Page

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for Help, Adding, Background, Image, To, Table, In, Xhtml, Page

*MORE FROM TRAP17.COM*
advertisement



Help Adding Background Image To Table In Xhtml Page



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE