How to change Background image

  • Potpara
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
13 years 4 months ago #10558 by Potpara
dear Sirs,
I want to put in my background image on the site. I used some free extensions but none of them work well. The problem with them is that every picture hung in the left corner of the site. So when you zoom it stays there. Is it possible to define a background image directly in your template? Also I need to tie the center of the image at the top of the page.

best regards

Please Log in to join the conversation.

More
13 years 4 months ago #10563 by ivan.milic
You can add your background image by adding your definition on bottom of template_css.css (it will override default)

body
{
background-image:url('...your image...');
background-repeat:no-repeat;
background-attachment:fixed;
background-position:center top;
}

Please Log in to join the conversation.

  • Potpara
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
13 years 4 months ago #10582 by Potpara
Ivane thank you for your help. Failed to add code that you put in the file temlate_css.css.
But when I spotted the mistake and realized that this part should be added to the file template_css.php then everything started OK.

Now part of the code in template_css.php concerning the background looks like this:

body {
font-size:<?php echo $mainFontSize; ?>px;
color:<?php echo $bodyText; ?>;
<?php if ($backgroundImage!="none") { ?>
background:<?php echo $backgroundColor; ?> url(<?php echo $template_path; ?>/images/bg_<?php echo $backgroundImage; ?>.png);
<?php }else{ ?>
background:<?php echo $backgroundColor; ?>;
<?php } ?>
background-image:url(../images/image.jpg);
background-repeat:no-repeat;
background-attachment:fixed;
background-position:center top;
}


In any case, thanks for the great support! ;)

Please Log in to join the conversation.

Time to create page: 0.150 seconds
Powered by Kunena Forum