View Full Version : Background image to short on the page
theremotedr
01-30-2015, 07:05 PM
Hi,
I have a background image which needs to be slightly longer on the page.
Looking at the link shown below you will see what i mean.
Scratching my head with how to overcome this as if i remember correctly in the past the image started to repeat itself.
The page in question as shown below
http://www.theremotedoctor.co.uk/ebay_programming.html
molendijk
01-30-2015, 07:25 PM
This might work:
body{
background-image: url(http://www.theremotedoctor.co.uk/ebay/Background1600x1400.jpg);
background-repeat: no-repeat;
background-size: cover
}
theremotedr
01-30-2015, 08:07 PM
Hi,
Kind of,it will be ok for what i require.
Thanks
styxlawyer
01-31-2015, 11:29 AM
This would look a lot better on your page:
body{
background-image: url(http://www.theremotedoctor.co.uk/ebay/Background1600x1400.jpg);
background-repeat: no-repeat;
background-attachment: static;
}
Beverleyh
01-31-2015, 11:35 AM
This would look a lot better on your page:
body{
background-image: url(http://www.theremotedoctor.co.uk/ebay/Background1600x1400.jpg);
background-repeat: no-repeat;
background-attachment: static;
}
background-attachment: static; is the default value so it would be no different from what the OP already has.
I would go with background-size: cover; too, or serve different images with media queries (portrait/landscape)?
theremotedr
01-31-2015, 11:50 AM
Hi,
Do i need to use the code shown below then ?
body{
background-image: url(http://www.theremotedoctor.co.uk/ebay/Background1600x1400.jpg);
background-repeat: no-repeat;
background-attachment: static;
background-size: cover;
}
Or advise otherwise so i can copy/paste.
theremotedr
01-31-2015, 12:26 PM
Here is the latest update.
Shown on the internet http://www.theremotedoctor.co.uk/ebay_programming.html
Shown on Ebay where it is used ebay.co.uk /itm/400853854590?ssPageName=STRK:MESELX:IT&_trksid=p3984.m1555.l2649
Beverleyh
01-31-2015, 12:46 PM
The CSS that Arie posted;
body{
background-image: url(http://www.theremotedoctor.co.uk/ebay/Background1600x1400.jpg);
background-repeat: no-repeat;
background-size: cover
}background-attachment: static;is not needed because it is already the default setting. It doesn't hurt to redeclare it but it it not necessary (it is duplicating styling that is already there).
theremotedr
01-31-2015, 12:59 PM
Thanks very much.
I will now delete the example page and just go with the ebay link.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.