1
hughs
Custom Block (HTML)
  • 2007/2/1 10:28

  • hughs

  • Not too shy to talk

  • Posts: 117

  • Since: 2003/10/7


Hello.

How can i insert an image in the background in a Custom Block (HTML.
thank you

hughs

2
carnuke
Re: Custom Block (HTML)
  • 2007/2/1 12:13

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


Try this FAQ here.
http://houseofstrauss.co.uk Resource for alternative health and holistic lifestyle
search xoops

3
mjz55
Re: Custom Block (HTML)
  • 2007/2/1 13:41

  • mjz55

  • Quite a regular

  • Posts: 298

  • Since: 2007/1/18


Can you point me to the FAQ; to add an image and make it a link in a custom block?

4
hughs
Re: Custom Block (HTML)
  • 2007/2/1 13:41

  • hughs

  • Not too shy to talk

  • Posts: 117

  • Since: 2003/10/7


Hello.
I did try your faq, but did not work, i still get a blank bg.
Thank you for your help.
hughs

5
mjz55
Re: Custom Block (HTML)
  • 2007/2/2 4:22

  • mjz55

  • Quite a regular

  • Posts: 298

  • Since: 2007/1/18


hummmm, no answer yet?

6
Peekay
Re: Custom Block (HTML)
  • 2007/2/2 10:10

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Take a note of the background image's dimensions and upload it to the image manager.

In the 'new block' setup screen, add a DIV to the block similar to the one below. If the BG image is to be static, the DIV needs to be the same height and width as the image. If you want a tiled BG, change the 'repeat' statement accordingly.

Open the image manager, right-click the image, select 'properties' and take a note of it's filename (it will be different from the filename you gave it).

Use the filename as the background image SRC.

<div style="width: 140px; height: 140px; background: url('{X_SITEURL}uploads/img455f18730d6f4.jpg') no-repeat top left">Block text goes here</div>


HTH
A thread is for life. Not just for Christmas.

7
mjz55
Re: Custom Block (HTML)
  • 2007/2/2 21:27

  • mjz55

  • Quite a regular

  • Posts: 298

  • Since: 2007/1/18


What if I want to put an image inside a block (hml) and make it a link to another web site?

8
Peekay
Re: Custom Block (HTML)
  • 2007/2/2 22:20

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


You can use the x_siteurl + directoryname + filename in any HTML code in a block. To use an image-manager image as a link:

<a href="http://www.sample.com"><img style="border: 0" src="{X_SITEURL}uploads/img455f18730d6f4.jpg"></a>
A thread is for life. Not just for Christmas.

Login

Who's Online

192 user(s) are online (122 user(s) are browsing Support Forums)


Members: 0


Guests: 192


more...

Donat-O-Meter

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

Latest GitHub Commits