Adding solid background that's in a fxd position

  • trey-braid
  • Topic Author
  • Visitor
  • Visitor
14 years 2 months ago #2747 by trey-braid
Hate to be jumping all over the place here Milos.

If I wanted to add a fixed background to this template what would I need to edit... your edits are quite a bit different than Joomla JA... I've got a background graphic that is 1600 x 1200 and I'd like it to be fixed on the page if someone scrolls up or down...

Trey

Please Log in to join the conversation.

  • milos
    Support Staff
  • Moderator
  • Moderator
More
14 years 2 months ago #2749 by milos
In template_css.css change line
Code:
background:<?php echo $backgroundColor; ?> url(<?php echo $template_path; ?>/images/bg_<?php echo $backgroundImage; ?>.png);
Code:
background:<?php echo $backgroundColor; ?> url(<?php echo $template_path; ?>/images/bg_<?php echo $backgroundImage; ?>.png) fixed;

It's not matter if we are different than JA, or JA is different than us.

If you want to make template alterations you must be familiar with HTML, CSS and PHP. Both our and JA's templates are based on those techniques, as well as any other in the world.

Please Log in to join the conversation.

  • trey-braid
  • Topic Author
  • Visitor
  • Visitor
14 years 2 months ago #2760 by trey-braid
When I mentioned that you do it a little different I meant in JA templates you just edit the template.css or theme.css and add a url to the background image...

yours is a php echo [background:<?php echo $backgroundColor; ?> url(<?php echo $template_path; ?>/images/bg_<?php echo $backgroundImage; ?>.png);]

this is what i have added - not working [ background:<?php echo $backgroundColor; ?> url(<?php echo $template_path; ?>/images/background/bg1_<?php echo $backgroundImage; ?>.png);]

have to ask- what did i do wrong...

Please Log in to join the conversation.

  • milos
    Support Staff
  • Moderator
  • Moderator
More
14 years 2 months ago #2763 by milos
What you did wrong you could see when you look at HTML source of your webpage. What you should edit was line
Code:
background:<?php echo $backgroundColor; ?> url(<?php echo $template_path; ?>/images/bg_<?php echo $backgroundImage; ?>.png) fixed;

Just add "fixed" before ";"

It's in file template_css.php (not template_css.css as I mentioned above). Sorry about that.

Please Log in to join the conversation.

  • trey-braid
  • Topic Author
  • Visitor
  • Visitor
14 years 2 months ago - 14 years 2 months ago #2766 by trey-braid
i am editting the template.css.php file... and i see what your talking about when i view the code.... they way your scripting is setup it is echoing the background color which in this case is #333333 and it is covering up the background image:

i see where it echoes the style 1 theme which i am using... just need to know how to incorporate an image which in my case is 1600 x 1200...

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/background/bg1_<?php echo $backgroundImage; ?>.png) fixed;

<?php }else{ ?>
background:<?php echo $backgroundColor; ?>;
<?php } ?>
}

...and when viewed in my css editor:

body {
font-size:12px;
color:#000000;
background:#333333 url(/templates/hot_sportal/images/bg_1.png) fixed;
}



i created a background folder within the images folder and placed the bg1 file there...it isnt even pulling the folder and correct file name... any idea why it is not showing
Last edit: 14 years 2 months ago by trey-braid.

Please Log in to join the conversation.

  • trey-braid
  • Topic Author
  • Visitor
  • Visitor
14 years 2 months ago #2768 by trey-braid
i figured out how you pull the image's...

it is working...

trey

Please Log in to join the conversation.

Time to create page: 0.086 seconds
Powered by Kunena Forum