GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Quick HTML Question (https://gfy.com/showthread.php?t=791744)

SuzzyQ 12-12-2007 10:23 PM

Quick HTML Question
 
How do I keep a background image form tileing across the page?
<body background="i dont want this pic to tile.jpg">

Thanks...

justFred 12-12-2007 10:26 PM

by using Styling
<body background="i dont want this pic to tile.jpg" style="background-repeat: no-repeat">

http://www.w3schools.com/css/tryit.a...peat_no-repeat

Zorgman 12-12-2007 10:29 PM

<body style="background:#FFFFFF url('i dont want this pic to tile.jpg') no-repeat top; padding-top:0px; margin-top:0px;">

shows a white background with your image in the top.

justFred 12-12-2007 10:31 PM

though if you need more than just the styling you'll want to put the style information in the header such as:

<head>

<style type="text/css">
body
{
background-image: url('i don't want this image to tile.jpg');
background-repeat: no-repeat
font-family: some font
color: some color
whatever: other CSS
}
</style>

</head>

and your code will be more readable and save you time.

darnit 12-13-2007 12:49 AM

Quote:

Originally Posted by justFred (Post 13507395)
though if you need more than just the styling you'll want to put the style information in the header such as:

<head>

<style type="text/css">
body
{
background-image: url('i don't want this image to tile.jpg');
background-repeat: no-repeat
font-family: some font
color: some color
whatever: other CSS
}
</style>

</head>

and your code will be more readable and save you time.

Good idea to use css however here it is corrected.

<style type="text/css">
body
{
background-image: url('i don't want this image to tile.jpg');
background-repeat: no-repeat;
font-family: some font;
color: some color;
whatever: other CSS;
}
</style>

You need the ";" after each style classification.


All times are GMT -7. The time now is 06:52 AM.

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