1
tedsmith
Add a Background Image to a Single Block
  • 2004/9/17 15:51

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


Is there any way to place a background image to a block? I know that in 'the old days' you could do the following :


blah


but I don't think that is possible with blocks. I only want it to show in my top block - the welcome screen of my main page. If you visit the site, http://www.lost-doggies.com, you will see where I mean.

Any thoughts? I did a search and there was reference to adding it to the whole theme, but I don't want that - I just want it on the 'Welcome to lost-doggies' block.

Thanks

Ted

2
philou
Re: Add a Background Image to a Single Block
  • 2004/9/17 16:01

  • philou

  • Quite a regular

  • Posts: 384

  • Since: 2002/5/6 8


you can define a special class in your css file and use it in your code for the block

3
JMorris
Re: Add a Background Image to a Single Block
  • 2004/9/17 16:29

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


Here's a little inline style that works great:
Quote:

{X_SITEURL}images/yourimagename.gif); background-repeat: no-repeat; background-position: center; min-height: 115px;">

This is just a test to show that you can add a background image to a block.




Just replace {X_SITEURL}images/yourimagename.gif with the appropriate path and file name, then change the min-height value to the height of the image.

Hope this helps.

JMorris

4
tedsmith
Re: Add a Background Image to a Single Block
  • 2004/9/27 18:41

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


Thank you very much for that help. I did what you said and it worked a treat, but I decided against the overall look in the end - decided it looked too cluttered. At least I will know the answer if I need it again though.

Cheers

Ted

Login

Who's Online

365 user(s) are online (283 user(s) are browsing Support Forums)


Members: 0


Guests: 365


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits