![]() |
| ||
| Help needed with fixed background! Hi, I'm trying to create a html page which allows the text to scroll without moving the background. I understand that I should probably be using something like: background-attachment: fixed; but the complication is that I have an image which covers the whole background and resizes itself depending on the screen size (without repeating itself). My code looks like this at the moment: <html> The re-sizing bit works perfectly, but it doesn't seem to want to work with the fixed background bit. (Hope this makes sense)Any ideas? (Unfortunatley I'm very pushed for time as this is for a piece of coursework thats due in tommorrow! I'd still be grateful of any help after this though - just out of interest and for future use). Thank you! Kate |
| ||
| Re: Help needed with fixed background! The problem is your image is not a background image, just a normal image. This means your css for background-attachment does not actually do anything on your image. The easiest solution to this is to use a proper background (look up 'background-image') and that way it will stay fixed. If you also need to size the image, well that is going to require some thought... I imagine the resizing is just something you added to make it nicer, but if it isn't a requirement, probably just get rid of it. |
| ||
| Re: Help needed with fixed background! in simple words use a div and display the image through css in the div's background. like <div style="background:url()"; position:fixed;}blah blah i think u can understand wht i mean coz u know css. |
| All times are GMT -4. The time now is 3:42 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC