September 8th, 2013, 04:10 AM
Css file and background image
So, I need to create my own website for my studies and it ll be my first time ever.
I designed a background in photoshop which i would like to use on my website, but i dont know how to do it. Somebody told me to use CSS, but i have basically no idea what i should type in index file and in style sheet.
Please help me how i can connect style sheet css.css file with index, so website will be using designs from css.
Thanks in advance!
September 8th, 2013, 03:29 PM
In your HTML file, inbetween the <head></head> tags, write this:
If your CSS file is inside another directory such as 'css' or 'stylesheets' then you need to be aware of this when connecting the stylesheet so rather than the above (which is written assuming the CSS file is in the same directory as your HTML file), you would write:
<link rel="stylesheet" href="css.css" />
In regards to your background image, you are better setting the <body> of the HTML page to have that background image.
<link rel="stylesheet" href="stylesheets/css.css" />
Once you get the above sorted and connected up properly, we'll move on to actually setting your background image with CSS.
Last edited by Nanomech; September 8th, 2013 at 03:31 PM.