#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    1
    Rep Power
    0

    Css file and background image


    Hello,
    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!
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Location
    The Pleiades
    Posts
    299
    Rep Power
    9
    Good evening,

    In your HTML file, inbetween the <head></head> tags, write this:

    Code:
    <link rel="stylesheet" href="css.css" />
    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:

    Code:
    <link rel="stylesheet" href="stylesheets/css.css" />
    In regards to your background image, you are better setting the <body> of the HTML page to have that background image.

    Once you get the above sorted and connected up properly, we'll move on to actually setting your background image with CSS.

    Kind regards,

    NM.
    Last edited by Nanomech; September 8th, 2013 at 03:31 PM.

IMN logo majestic logo threadwatch logo seochat tools logo