Search Form and Social Buttons

HotThemes Logo and Top Menu

To request a forum account, please login here and open support ticket. Only customers with active order(s) can open forum account!

× Discussion about "Sportal" Joomla template.

Topic-icon How to change Background image

More
5 years 10 months ago #10558 by Potpara
Potpara created the topic: How to change Background image
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
5 years 10 months ago #10563 by ivan.milic
ivan.milic replied the topic: Re: How to change Background image
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.

More
5 years 10 months ago #10582 by Potpara
Potpara replied the topic: Re: How to change Background image
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.119 seconds

Links, Partners and Social Media