/    Sign up×
Community /Pin to ProfileBookmark

Requesting script to stop background image tiling in table cell

Hi Everybody,
I have a backgound image sized to fit a single table cell within my page and want to stop that image tiling when the page is viewed at a larger screen size. The code I’m using to try to do it is:
<style type=”text/css”>
<!–
font {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
font-style: normal;
font-weight: normal;
color: #000000;

}
background {
background-image: url(images/vertnex.gif);
background-repeat: no-repeat;
background-position: center center;

}
–>
</style>

I’ve looked all over (extensively through this forum), and haven’t found an answer. Can anyone help?
Thanx in advance,
iainwatt64.

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@pcthugFeb 24.2006 — [B]font[/B] and [B]background[/B] are not set HTML elements/tags, therefore these styles must be applied to a specific class/id which is then called upon by the table cell:
[CODE]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>I am a title</title>
<style type="text/css">
<!--
.style {
color: #000;
background: url(images/vertnex.gif) no-repeat center center;
font: normal 10px Verdana, Arial, Helvetica, sans-serif;
}
-->
</style>
</head><body>

<table>
<tr>
<td class="style">
No tiled images to be found here!
</td>
</tr>
</table>

</body>
</html>[/CODE]
Copy linkTweet thisAlerts:
@iainwatt64authorMar 07.2006 — Problemmo now solved, infinite thanks to PCThug. Only glitch was font formatting disappeared using that specific code, but easily resolved by reverting to former font style code and keeping ".style" to stop image tiling. I bow down before your wisdom, iainwatt64.
×

Success!

Help @iainwatt64 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...