GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Webmaster Q & Fuckin' A (https://gfy.com/forumdisplay.php?f=27)
-   -   css question (https://gfy.com/showthread.php?t=373184)

shyguy 10-16-2004 09:12 PM

css question
 
hiya ppl... i am using an image as a background in a table. but i want that image to not repeat itself when the table is stretched larger then its height... i was told i could fix this with css and i have looked around and read about it... but i cant find any straight forward answer for putting it into a table...

help please!

Intrigue 10-16-2004 11:36 PM

in the table tag, or wherever you have it, in the 'background' attribute you need to have no-repeat, so if your using a style attribute (inline css) you'd use style="background: no-repeat;" or just add no-repeat to your existing bcakground attribute if you have one already eg: 'background: url('/images/bg.gif');' becomes 'background: url('/images/bg.gif') no-repeat;'

hope that clears it up for you.

shyguy 10-17-2004 08:26 PM

hey cheers,

i changed this line to <td width="680" height="377" valign="top" background="images/bgbeta.jpg" style="background: no-repeat;" >

but that made the bg dissappear?? could that be because i already have css style for my scroll bars defined at the top of my html? hence i have to then define everything up there now?

im a bit new to all the css stuff...

i also tried defining the background properties up the top, but im not sure that i was calling it correctly back down in the html where my table was...

help please!

MBS Auto 10-17-2004 08:59 PM

What size is the image and what size is the table??

dexterlab 10-18-2004 07:48 AM

See below for what you're trying to do.
The path to the image can be relative or absolute if you're deploying in a war file or something to that effect. note the embedded DIV that inherits from the td class.
Code:

<html>
<style>
td.logo div {background-image: url(corner-black.gif); }
</style>
<body>
<!-- the above style should read td dot logo div open curly then the rest of the line - it is getting munged when i post -->
<table>
<tr>
<td class="logo"><div>Row 1, Cell 1</div></td><td>Row 1, Cell 2</td>
</tr>
<tr>
<td>Row 2, Cell 1</td><td class="logo"><div>Row 2, Cell 2</div></td>
</tr>
</table>
</body>
</html>


shyguy 10-20-2004 07:00 PM

cheers heaps for you help here dexterlab!

i entered this into my css style section at the top:

td.bglogo { background: url('images/bgbeta.jpg') no-repeat;}

and then i just called the bglogo class like so:

<td class=bglogo width= etc. etc.>

as its just one table that i want it in... so does that seem correct? it seems to be working... i didnt include the div though... did i need to ?

but i cant see it in dreamweaver, only when i actually preview it in a browser...

ps. it seems that haha123; equals the left curly bracket...


All times are GMT -7. The time now is 09:48 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123