WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Need Help to Install images from CSS into WB template
  • Print
Pages: [1]   Go Down

Author Topic: Need Help to Install images from CSS into WB template  (Read 3589 times)

WBGurl

  • Guest
Need Help to Install images from CSS into WB template
« on: October 05, 2010, 08:36:45 PM »
Lets hope I can explain this correctly. I have a template I'm working on getting together right now. I unfortunately can't show it off right now because I'm only using the demo for website baker right now but I can show you the code. However I don't even think you'll need to look at the code. All I ask is how I might go about trying to import images from the CSS. The Designers guide tell you to

Quote
<img src="<?php echo TEMPLATE_DIR;?>/img/mypic.gif" alt="mypic" />
But that's when your adding the template functions to the index.PHP page.

I have some images in my CSS code that have to be there in order for some fixes in my website to work. How do I make it so when I install my template into Website Baker it can see the images in the CSS code as well?

This is part of my CSS code where some of my images are:
Quote
body {
   background-image: url(img/BG_NEW.jpg);
   background-repeat: repeat-x;
   background-color: #0a1c4f; 
   font-family: Georgia, "Times New Roman", Times, serif;
   color: #CCCCCC;
   margin: 0px;
   margin-bottom: 0px;
   }


html, body { height: 100% }

.wrapper {
   min-height: 100%;
   height: auto !important;
   height: 100%;
   margin: 0 auto -15.5em;
   /*border-color: #000000;
   border-width: 3px;
   border-style: solid;*/ }


.footer, .push {
   height: 15.5em;
   clear: both;
   background-image: url(img/footer.png); background-repeat: no-repeat; background-position: center; }
   
#extra{
   width: 100%;
   height: 41px;
   background-color: #250053;
   margin-bottom: 0px;
   margin-top: 0px;
}


#banner{
   width: 100%;
   height: 160px;
   background-image: url(img/banner_bg.png);
   background-repeat: repeat-x;
}

Any help would be much appreciated as I have look all over.

Logged

Offline kweitzel

  • WebsiteBaker Org e.V.
  • **
  • Posts: 6983
  • Gender: Male
Re: Need Help to Install images from CSS into WB template
« Reply #1 on: October 05, 2010, 09:16:07 PM »
The CSS is always relative to the page you are on. So you need to hard-code the full URL to the image to succeed.

cheers

Klaus
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Need Help to Install images from CSS into WB template
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2