Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Fixed and scalable background issue Reply To: Fixed and scalable background issue

#169199
nigelc
Participant

The problem is though that if you set a fixed height in px at 1280px wide the image will be fine. However in a 640px wide viewport the wine glasses will look like champagne flutes and in a whacking big 2560px display they will look like brandy balloons.

Also if you set position:fixed; to an object you remove it from the normal document flow in the same way as setting position to absolute. This means that setting background size to cover it will extend to the full size of the window not to the div.

Add height:600px to the .banner CSS and ditch the background size cover.

Otherwise try setting the width to 100% and allow the height to scale accordingly.