delivi
Jan 1 2007, 07:06 PM
| | 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
Jan 1 2007, 07:17 PM
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
Jan 1 2007, 07:51 PM
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
Jan 2 2007, 12:19 AM
No problem delivi and remember vote me president of the world in 2035

. Topic solved and topic closed.
Reply
Recent Queries:--
xhtml background img url code - 186.46 hr back. (1)
-
inserting css background image in a table - 299.46 hr back. (1)
-
xhtml adding backgrounds - 316.32 hr back. (1)
Similar Topics
Keywords :
adding background image xhtml- Problem Aligning In Firefox
- Problem aligning an image in Firefox. (9)
- 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 { ...
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 ...
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 ...
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' /> ...
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....
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?...
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
">...
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