Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
The wood doesn’t look like it has symmetry that you can tile or repeat, and yes if you’re using a responsive theme the PNG positioned on top of the wood would have to behave responsively, e.g.:
@media screen and (max-width: 320px) {
.thatPNG {
display: none;
}
}
.thatPNG {
display: block;
}
yeah, that’s not the wood I’m using – that was just a screnshot of an example the client wanted.
I’m working with using this:
body {background: url(http://www.redesign.chinchedbistro.com/wp-content/uploads/2014/06/ChatcutrieBG.png),url(http://www.redesign.chinchedbistro.com/wp-content/uploads/2014/06/darkwoodbg.jpg);background-repeat: no-repeat, no-repeat, repeat-x;
background-position: left top, right top, left top ;
}
think that would be cool?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Yes, the code itself is fine.
wait … one question – if I wanted this images … fixed … what`s the syntax for that in this context?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
The element the background image is applied to, preferably not the <body>
, should be given fixed position:
position: fixed;
body {background: url(http://www.redesign.chinchedbistro.com/wp-content/uploads/2014/06/ChatcutrieBG.png),url(http://www.redesign.chinchedbistro.com/wp-content/uploads/2014/06/darkwoodbg.jpg);background-repeat: no-repeat, no-repeat ;
background-position: fixed, right top ;
would that be right? Or am I appling it to body again?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Maybe you want to use background-attachment instead:
body {
background:
url(http://www.redesign.chinchedbistro.com/wp-content/uploads/2014/06/ChatcutrieBG.png) no-repeat fixed,
url(http://www.redesign.chinchedbistro.com/wp-content/uploads/2014/06/darkwoodbg.jpg);
}
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
excellent …. i’ll look into it. Thanks a bunch Andrew.