View Full Version : background image from another CSS file?
Freeman
01-30-2008, 05:40 PM
I want to link all the pages I want to have a certain background image linked to a single css file. How do I do that? Thanks for any help, JF
Medyman
01-30-2008, 06:06 PM
<link href="path/to/stylesheet" media="screen" rel="Stylesheet" type="text/css" />
Next add this to the css file: (if you're adding the background to a page, not a div):
body { background-image:url(relative/path/to/image/from/css/file); }
It's as simple as that :)
HTH
Freeman
02-01-2008, 02:34 AM
Is there anything that can make this not work? All my references are correct, the address's are correct, everything is spelled correctly, but it doesn't work. Any thoughts? I'll keep testing different things. Thanks for any help, JF
Medyman
02-01-2008, 02:47 AM
Is there anything that can make this not work? All my references are correct, the address's are correct, everything is spelled correctly, but it doesn't work. Any thoughts? I'll keep testing different things. Thanks for any help, JF
It's hard to know without seeing your code. Please post relevant code and I'm sure we can get to the bottom of it.
Freeman
02-01-2008, 02:51 AM
So, it does work, I just need to figure out what is wrong with my code. Thanks, Jf
The reason it did not work is because I had the <style type="text/css"> in my css file. It didn't like that very much. thanks for the help, JF
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.