PDA

View Full Version : how to set the background image as repeat-x only??


fattat
04-29-2009, 03:12 PM
how to setting the code to make the background images repeat-x only and disable repeat-y

how to add in the code??
http://img49.imageshack.us/img49/8272/picture1rvy.png (http://img49.imageshack.us/my.php?image=picture1rvy.png)



here is the html code

<body>
<table width="421" height="535" border="0" cellpadding="0" cellspacing="0">
<tr>
<th width="17" height="17" scope="col"><img src="images/lefttop.png" alt="" width="17" height="17" /></th>
<th width="400" scope="col"><img src="images/pinkdummie.png" alt="" width="400" height="10" style="margin:0px 0px 7px 0px;" /></th>
<th width="10" scope="col"><img src="images/rightop.png" alt="" width="17" height="17" /></th>
</tr>
<tr>
<td><img src="images/pinkdummie.png" width="10" height="500" style="margin:0px 7px 0px 0px;" /></td>
<td valign="top" background="images/picture1.png" ><div align="justify" style="padding:50px 35px 8px 35px;">
<strong>Tem accusanum</strong> tota reriam aipsa
invetore ativert enimamolu bertastatem
it aspernatur adit ased kretase mias
quia c uuntur magni dolore...<strong>Tem accusanum</strong> tota reriam aipsa
invetore ativert enimamolu bertastatem
it aspernatur adit ased kretase mias
quia c uuntur magni dolore...<strong>Tem accusanum</strong> tota reriam aipsa
invetore ativert enimamolu bertastatem
it aspernatur adit ased kretase mias

Corrosive
04-29-2009, 03:50 PM
background-repeat: repeat-x; should do it

DWcourse
04-29-2009, 03:51 PM
background: url(/images/bg.gif) repeat-x;

fattat
04-29-2009, 04:19 PM
<td height="368" valign="top" background="images/picture1.png" repeat-x; >

is that adding here??
still cant....





http://www.zshare.net/download/5936353029c5f559/

d a v e
04-29-2009, 04:45 PM
no, add to your stylesheet

fattat
04-29-2009, 11:46 PM
just adding in css??

http://img2.imageshack.us/img2/617/picture1zdq.png (http://img2.imageshack.us/my.php?image=picture1zdq.png)

but still cannot

DWcourse
04-30-2009, 12:13 AM
ahem, you actually have to name the style. For the body tag:

<style type="text/css">
<!--
body {
background-image: url(images/bg.gif);
background-repeat: repeat-x;
}
-->
</style>

or make it a class and apply it to an html object<style type="text/css">
<!--
.bgStyle{
background-image: url(images/bg.gif);
background-repeat: repeat-x;
}
-->
</style>

fattat
04-30-2009, 01:18 PM
ahem, you actually have to name the style. For the body tag:

<style type="text/css">
<!--
body {
background-image: url(images/bg.gif);
background-repeat: repeat-x;
}
-->
</style>

or make it a class and apply it to an html object<style type="text/css">
<!--
.bgStyle{
background-image: url(images/bg.gif);
background-repeat: repeat-x;
}
-->
</style>


if i want to add css in my table <td>
how to add the code in my <td> table??

my html code is
<td valign="top" background ="images/picture1.png" ><div align="justify" style="padding:50px 35px 8px 35px;" >

DWcourse
04-30-2009, 01:47 PM
my html code is
<td valign="top" background ="images/picture1.png" ><div align="justify" style="padding:50px 35px 8px 35px;" >

Define the style in the header or a separate style sheet and then apply it to the table cell.

<td valign="top" class=".bgStyle" >

You really have some crazy things going on in your code You need to get a good understanding of CSS to do the things you want to do. It's hard to pick up helter skelter.

fattat
04-30-2009, 01:55 PM
haha...thank you


it work now..

but correct code is
<td valign="top" class="bgStyle" >

DWcourse
04-30-2009, 02:02 PM
ll I can tell you is that the .bgStyle is supposed to insert the background image. Sp you need to change the style to point to your image and then delete "background ="images/picture1.png"" in the html.

Sorry but you don't understand css and I can't teach a course on it here.

fattat
04-30-2009, 02:33 PM
ll I can tell you is that the .bgStyle is supposed to insert the background image. Sp you need to change the style to point to your image and then delete "background ="images/picture1.png"" in the html.

Sorry but you don't understand css and I can't teach a course on it here.

ya...i have delete the "background ="images/picture1.png"
thank a lot for ur teaching