Copy link to clipboard
Copied
I'm working on a site and I want a fixed background-attachment. It seems to work fine when I run it off of the server, but for some reason when I am running it off Dreamweaver's Real Time Preview in Chrome, the background scrolls opposite of the web page. This is an odd quirk that I've only seen in Dreamweaver, but it works fine on all other browsers when it is run off the server. Thoughts?
Code is appropriate: body{ background: url("backgrounds/tree_lined2.jpg") fixed; }
HTML just shows <body class="container">
I also tried separating and explicitly defining background-image and background-attachment and it still didn't make a difference.
1 Correct answer
Real Time Preview places your site within a frameset on Adobe's server. It's likely this antiquated usage of Frames is causing the most recent version of Chrome to go a little sideways on you.
If it looks right when uploaded, it's very likely correctly coded. You can make sure you're doing it right by validating your code at the sites below...
Copy link to clipboard
Copied
I'v got multiple backgrounds, two of which are fixed. This is how I coded it:
background: url(../img/left-column.png) left top no-repeat fixed, url(../img/right-column.png) right top no-repeat fixed, url(../img/html-bg.png) center repeat;
I have no problems with Chrome in Real-time Preview. I should add that I am on a Windows machine. Maybe that is the difference.
Copy link to clipboard
Copied
I haven't applied any positioning as it covers the entire page background in one image, but with the exception of fixed positioning, our code is the same. I also work on a windows machine. It may just be an issue with the server and how it is viewing it. Like I said, it works on the web from my live web server on Blue Host. I'll see if a fixed position makes a difference, but if it isn't broken I suppose there's not much reason to fix it, it's just mildly irritating..
Copy link to clipboard
Copied
Real Time Preview places your site within a frameset on Adobe's server. It's likely this antiquated usage of Frames is causing the most recent version of Chrome to go a little sideways on you.
If it looks right when uploaded, it's very likely correctly coded. You can make sure you're doing it right by validating your code at the sites below...

