Background images not displaying

This forum is for all Flare issues related to the Microsoft HTML Help target.
This target produces "CHM" files in the output.
Post Reply
helen
Sr. Propeller Head
Posts: 276
Joined: Thu Oct 25, 2007 5:57 am
Location: Manchester, UK

Background images not displaying

Post by helen »

I'm trying to add a faint image as a background to anchor bottom right to my CHM window. I'm putting it in the <body> on my stylesheet, but it's not showing up in the preview. I have tried numerous other images in my project and every single one shows up just fine, except the one I want! It is the right size, but no matter what format I try, it just won't show up. Is there some kind of restriction I'm missing? It must be something to do with my image I think, but I have no idea what! I am confused. :(
helen
Sr. Propeller Head
Posts: 276
Joined: Thu Oct 25, 2007 5:57 am
Location: Manchester, UK

Re: Background images not displaying

Post by helen »

Solved it! :D

Erm - how can I get it to anchor to the bottom right of my skin window though? Not solved that yet. :roll:
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Background images not displaying

Post by KevinDAmery »

Only way I can think to get bottom right would be to put it in a table. You may also be able to get somewhere with the Float attribute, but I'm not sure how well CHM uses that.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: Background images not displaying

Post by NorthEast »

You don't need to use tables or floats, just set the stylesheet properties for background-position and background-repeat, e.g.

background-position: right bottom
background-repeat: no-repeat
helen
Sr. Propeller Head
Posts: 276
Joined: Thu Oct 25, 2007 5:57 am
Location: Manchester, UK

Re: Background images not displaying

Post by helen »

Dave Lee wrote:You don't need to use tables or floats, just set the stylesheet properties for background-position and background-repeat, e.g.

background-position: right bottom
background-repeat: no-repeat
That simple :shock:

Works perfectly - I was just trying to complicate it :lol:
helen
Sr. Propeller Head
Posts: 276
Joined: Thu Oct 25, 2007 5:57 am
Location: Manchester, UK

Re: Background images not displaying

Post by helen »

Hmm, okay, that's not working as well as I thought. There's a repaint problem if the page is longer than the height of the skin. It paints another image bottom right when you scroll down but doesn't remove the first one until you force a repaint by resizing the window. Does anyone know a way around this one - or a way to force a repaint on scroll or similar?

Thanks :)
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Background images not displaying

Post by KevinDAmery »

I knew there was a reason we kept Dave around.... :mrgreen:
Until next time....
Image
Kevin Amery
Certified MAD for Flare
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Background images not displaying

Post by LTinker68 »

I don't have Flare open at the moment and I don't remember the actual CSS property, but one of those repeat fields is supposed to have an option to keep the background stationary and move the text over it -- sort of anchor the image in place. You'll have to look around to see what the options are.

You could also create a DIV, give it a Z-index of 10 or something, and set its bottom and right values to 5 or 10px. Double-check that in IE6, though -- I can't remember if IE6 handles the right positioning field correctly on DIVs.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Pete Lees
Sr. Propeller Head
Posts: 150
Joined: Thu Feb 09, 2006 12:33 pm
Location: Bracknell, Berkshire, UK

Re: Background images not displaying

Post by Pete Lees »

Hi,
LTinker68 wrote:I don't have Flare open at the moment and I don't remember the actual CSS property, but one of those repeat fields is supposed to have an option to keep the background stationary and move the text over it -- sort of anchor the image in place.
That's right: "background-attachment: fixed". So:

Code: Select all

body {

   background: url(FaintImage.gif);
   background-attachment: fixed;
   background-position: right bottom;
   background-repeat: no-repeat;

}
Pete
helen
Sr. Propeller Head
Posts: 276
Joined: Thu Oct 25, 2007 5:57 am
Location: Manchester, UK

Re: Background images not displaying

Post by helen »

Working perfectly! Thank you all. :D
Post Reply