Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

background image

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Hi
New website, new template and I've fallen at the first hurdle again :-(
I'm trying to add a background image but I'm going wrong somewhere.
This is the code I'm using in custom.css:

html body
{
background: url("newsite/images/clouds.png");
}
#zen-wrap
{
background:none;
}

I can give the background a colour, but not the image.
Any idea where I'm going wrong?
Thanks
Ian
  • ianpanorton's Avatar
  • ianpanorton
  • 6 Month Developer
  • 1258 posts
  • 3 Thanks
  • Karma: 7
The administrator has disabled public write access.
Hi Ian,

What is the link for the site?

What folder is the image in?

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Hi Paul - hope you're well, and been enjoying the sunshine.

The site is www.bizzybounce.co.uk/newsite/

clouds.png is in the /newsite/images folder.

Perhaps I should take up market gardening!

Thanks

Ian
  • ianpanorton's Avatar
  • ianpanorton
  • 6 Month Developer
  • 1258 posts
  • 3 Thanks
  • Karma: 7
The administrator has disabled public write access.
Hi Ian,

I find it easier to separate out images for the template design and content images

It also makes the paths a bit easier to work out - I'd move that file to the template images folder

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Hi Ian

As Paul says just a path issue.

background: url("../../../images/clouds.png"); - will let you use the image in the joomla root image directory. Just check the number of ../ is picking up the correct image file as you have similar in the current site maybe?

or

background: url("/images/clouds.png"); - will let you use the image uploaded with the template as it looks like you added an image to the template as Paul suggested.

The path you had included the sub directory for the site, used for development in this case. The path needs to be relative to the position referencing it.

Keeping the images in the Joomla images directory had the advantage that you can let users change the image of a background without accessing the template code. I use this method if the background is likely to the be changed by the user.

Including in the template image folder, as Paul suggests, is best if this is part of the template design that you don't want users messing with!

Market gardening sounds fun though in the current sunshine here in Wales!

Regards
Ian

Paul: Hope you are feeling better!
  • iafdesign's Avatar
  • iafdesign
  • LIfetime Developer - Big Bamboo
  • 393 posts
  • 153 Thanks
  • Karma: 58
The administrator has disabled public write access.
Perfect!
Thanks guys :-)

Another Ian in sunny Wales - Shwmae :-)
  • ianpanorton's Avatar
  • ianpanorton
  • 6 Month Developer
  • 1258 posts
  • 3 Thanks
  • Karma: 7
The administrator has disabled public write access.
Thanks Ian & Ian :)

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers