Jump to content

Archived

This topic is now archived and is closed to further replies.

antonyw

Different background image different pages - stretch no tiled

Recommended Posts

antonyw
Hi, I followed the instruction provided in another post for having different images on different pages and it worked well - thanks for that.

What I would like to do now though is set image to be stretched to full width rather than be tiled. Does anyone know how to do this?

Thanks in advance

Share this post


Link to post
Share on other sites
Danny

Hi,

 

Can you provide a link to the site in question and also, when posted code, can you use the [ code ] bbcode please.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Danny

From viewing your site you seem to have this working, so not sure what the problem is.

You need to make sure you're using valid CSS, as there is no property called repeat or page_background_image_repeat.

See here for background properties - http://www.w3schools.com/css/css_background.asp


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
antonyw
Thanks - yes I got the right CSS in the end but it still didn't work. On large screens .... Or with a smaller image the image is tiled in x and y....

Share this post


Link to post
Share on other sites
antonyw
background-repeat:no-repeat;......... Didn't work

Share this post


Link to post
Share on other sites
Danny

On this page - http://d.pr/i/wuX3

There is no background-repeat loading, therefore, its not been added.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Danny

Yeah, you need to add the background-repeat: no-repeat to your CSS, the link I provided above, as all the CSS you need.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
antonyw
Ok I'll do it again but it didn't work..... 'ang on

Share this post


Link to post
Share on other sites
Danny

OK, use this:

 

 /* Replace X with your page id */

body.page-id-X {

background-image: url(background image url);

background-repeat: no-repeat;

}


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Danny

OK, your issue is that you have added the code twice, one with no repeat and the other without no repeat, see my screenshot.

 

Therefore, remove the line of code that doesn't contain the no-repeat.

 

http://d.pr/i/wT3o


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
antonyw
I'm an idiot...... That worked..... Thanks for that

Share this post


Link to post
Share on other sites
antonyw

one more quick question, i set the background to fixed but its still moving with the content

i want the image to remain stationary while i scroll the text over the top of it...

Share this post


Link to post
Share on other sites
antonyw
Interestingly the fixed image works fine on PC but not on iPad...... But it did work on iPad with the built in dms functionality for setting background image

Share this post


Link to post
Share on other sites
antonyw
Is there some kind of touch screen scroll CSS?

Share this post


Link to post
Share on other sites
James B

Hi there, I'm viewing on an iphone and the image is showing up as fixed. The image remains in place and the text flows over it as you scroll. Are you seeing the image move with the text then? If you've viewed previously on the ipad you might need to clear the cache in order to see any changes.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
antonyw
I am still seeing the image move with text in iPad and iPhone even after clearing cache

Share this post


Link to post
Share on other sites
James B

Which mobile browser are you using? And which version of IOS?

 

Apparently searching the web quiet a few mobile browsers don't support fixed.

 

Apparently only the latest updates do support this, so it might depend on what you're using to view. For full post see - http://stackoverflow.com/questions/16009035/fixed-position-background-on-ipad which has a workaround you can try and some more info on additional css to add.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites

×