brunocbreis Posted March 1, 2010 Report Share Posted March 1, 2010 (edited) I want to apply the same background with repeat-x to multiple divs.I added a class to the divs, and my CSS was: .class {width: 400px;height: 500px;border: 1px solid black;background: #xxxxxx url('URL') repeat-x fixed;} Is there anything wrong? Because the background image was only applied to the first div, while the background color was applied to all.I thought it was because it was set to repeat-x and the divs were on top of each other (y); if that is the problem, how do I fix it.I hope I was clear, thanks in advance!EDIT: I'm new here, I'm sorry if it's the wrong forum. It didn't allow me to post on the CSS one... Edited March 1, 2010 by Bruno Reis Link to comment Share on other sites More sharing options...
justsomeguy Posted March 1, 2010 Report Share Posted March 1, 2010 It's probably because you used fixed for the positioning. Read up on what using fixed does. It didn't allow me to post on the CSS one...Is that true, if you try to create a new thread in the CSS forum now does it tell you you're not allowed? Link to comment Share on other sites More sharing options...
brunocbreis Posted March 1, 2010 Author Report Share Posted March 1, 2010 (edited) Is that true, if you try to create a new thread in the CSS forum now does it tell you you're not allowed?It was true. But now I can.Thanks!And also, as of what I know, "fixed" means the background doesn't scroll with the page (or, in this case, the div), right?If that's so, I kinda want it to be fixed :/EDIT: You were right! The fixed was unnecessary. Thanks for your help Edited March 1, 2010 by Bruno Reis Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now