Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
Backgroungd in css or html.?
I have this code:
<table width="100%">
<tr>
<td width="160">
<a href="#hm" class="ZOOM">ABC</a><br/>
<a href="#hk" class="ZOOM">XYZ</a><br/>
<td width="*">
.
.
.
.
.
.
My stuff here
.
.
.
.
.
.
</td>
</tr>
</table>
The part with td width = 160 should have it's width constant, and it's own image, e.g. sidebar.jpg. How do I do this ??
Btw, the backgroung should 'fit itself' in the browser window.
1 Answer
- 1 decade agoFavorite Answer
First of all you have an error did't close the td tag ;)
<td width="160">
<a href="#hm" class="ZOOM">ABC</a><br/>
<a href="#hk" class="ZOOM">XYZ</a><br/>
<td width="*">
this is what you have to write:
<td width="160" id="leftside">
<a href="#hm" class="ZOOM">ABC</a><br/>
<a href="#hk" class="ZOOM">XYZ</a><br/>
</td>
<td>
width="*" not need.
and put in your css this code:
#leftside{
background-image: url(images/sidebar.jpg);
background-position: center;
background-repeat: no-repeat;
}
background-repeat can be repeat-x or repeat-y or just delete the line to fill the td with your background image