PDA

View Full Version : Help with background


MarkFoster
08-04-2010, 06:11 AM
I have created quite a few custom pages, but I've got a problem.

This is what I use:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
</head>
<body>
$header
$navbar

$footer
</body>
</html>

I need to know how I can add something like "#dbe9df url(images/mainbg.png)" to the page. I need to know how to add a page background. Can anybody give me a code for this? (For use in template (Style settings is not an option as the image should only be placed on a few pages))

DataHero
08-04-2010, 07:27 AM
I don't think I'm understanding your point fully, but you basically want assign a certain background image to a certain page, yes? If so, you could add an image class or ID (if a different one in each page) in $header or wherever you want, using CSS.

e.g., in $header:

<img src="spacer.gif" class="whateverClass" alt="" />
OR
<img src="spacer.gif" id="whateverID" alt="" />

<!-- CSS in a different file, but using HTML BBCode anyway -->
img.whateverClass {
background-image:url(pathtoimage);
background-repeat:none;
}
OR
img#whateverClass {
background-image:url(pathtoimage);
background-repeat:none;
}


But again, I don't think I understood your point correctly.

Hell Bomb
08-09-2010, 12:24 AM
Try this.

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
</head>
<body style="background:#dbe9df url(images/mainbg.png);">
$header
$navbar

$footer
</body>
</html>

also depending on the image you might wanna make the image repeat you can do this by doing any of the following.
<body style="background:#dbe9df url(images/mainbg.png) repeat-x;">
<body style="background:#dbe9df url(images/mainbg.png) repeat-y;">
<body style="background:#dbe9df url(images/mainbg.png) repeat;">

MarkFoster
08-09-2010, 11:57 AM
Try this.

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
</head>
<body style="background:#dbe9df url(images/mainbg.png);">
$header
$navbar

$footer
</body>
</html>

also depending on the image you might wanna make the image repeat you can do this by doing any of the following.
<body style="background:#dbe9df url(images/mainbg.png) repeat-x;">
<body style="background:#dbe9df url(images/mainbg.png) repeat-y;">
<body style="background:#dbe9df url(images/mainbg.png) repeat;">

I need something like this, but I do not need to change the body background but the page background.

vbplusme
08-09-2010, 02:46 PM
Check the MainCSS, in the style manager search for "Page Background" and make your changes there... HTH

MarkFoster
08-09-2010, 04:11 PM
Check the MainCSS, in the style manager search for "Page Background" and make your changes there... HTH

You don't seem to understand, the settings I have are settings I want to keep, what I want to do is add a different CSS to specific pages.