- Posts: 6744
- Thank you received: 716
Adding solid background that's in a fxd position
-
trey-braid
- Topic Author
- Visitor
14 years 2 months ago #2747
by trey-braid
Adding solid background that's in a fxd position was created 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
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
Less
More
14 years 2 months ago #2749
by milos
Replied by milos on topic Re: Adding solid background that's in a fxd position
In template_css.css change line
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.
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
14 years 2 months ago #2760
by trey-braid
Replied by trey-braid on topic Re: Adding solid background that's in a fxd position
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...
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
Less
More
- Posts: 6744
- Thank you received: 716
14 years 2 months ago #2763
by milos
Replied by milos on topic Re: Adding solid background that's in a fxd position
What you did wrong you could see when you look at HTML source of your webpage. What you should edit was line
Just add "fixed" before ";"
It's in file template_css.php (not template_css.css as I mentioned above). Sorry about that.
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
14 years 2 months ago - 14 years 2 months ago #2766
by trey-braid
Replied by trey-braid on topic Re: Adding solid background that's in a fxd position
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
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
14 years 2 months ago #2768
by trey-braid
Replied by trey-braid on topic Re: Adding solid background that's in a fxd position
i figured out how you pull the image's...
it is working...
trey
it is working...
trey
Please Log in to join the conversation.
Time to create page: 0.086 seconds