Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Background attachment.

Community Beginner ,
May 08, 2018 May 08, 2018

background-image: url(../images/Sitephotos/body.jpg);

background-attachment:fixed;

Works for Internet Explorer and Microsoft Edge but Google Chrome drags the background image down on scroll. Any suggestion how this can be fixed for Chrome?

1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 09, 2018 May 09, 2018

Have a look at Perfect Full Page Background Image | CSS-Tricks

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 09, 2018 May 09, 2018

Try this:

background: url(https://placeimg.com/1200/500/arch) no-repeat center center fixed;

background-size: cover;

}

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 09, 2018 May 09, 2018

Nancy Shea, with this in my case, the background gets attached to the page and scrolls with it in all browsers. I got rid of it and set the original simple code:

html {

background-image: url(../images/Sitephotos/body.jpg);

background-attachment:  fixed;

}

Works on IE and Edge. but not on Chrome. Not fixed on Chrome. Drags down as I scroll down and the page goes up.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 09, 2018 May 09, 2018

Whatever is suggested on this page works on Internet Explorer and Microsoft Edge. Google Chrome drags the background downwards. It was working fine on Chrome till day before yesterday. No changes in codes have been made. Since yesterday, Google Chrome started misbehaving.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 09, 2018 May 09, 2018

Upload work to your remote server and post the URL please.

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 09, 2018 May 09, 2018
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 09, 2018 May 09, 2018

No that URL is to a local preview on your computer which nobody can see except you. 

You need to actually upload your work to a public facing web server you control so we can see it online.

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 09, 2018 May 09, 2018

I am just testing it. Haven't uploaded the site yet, pending image of the book. I have expressed to the problem quite clearly.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 09, 2018 May 09, 2018

CSS and HTML are fickle.

Even small errors in your code that reside in apparently unrelated areas of your page can cause display issues. Those display issues can be completely different, or missing entirely, between browsers/platforms/devices.

Run your code through the validators below...

CSS: The W3C CSS Validation Service

HTML: Ready to check - Nu Html Checker

...clean up any errors you find there and the display issue may be corrected. If it's still happening even after the code has been validated and cleaned, it could be an implementation issue (technically correct, but wrong for the effect you are trying to achieve). Posting a link to your work in progress will allow us to see what's happening in our own browsers and offer advice on how to fix it. Posting the entire code of the page (CSS and HTML) would be a fairly distant second.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 09, 2018 May 09, 2018
LATEST

It's not clear to me what the problem is.  That's why I'd like to see it in my browsers.  Can't you upload to a TEST folder on your server and then remove the TEST folder when your question is answered?

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines