Html problems

Hey guys
i have a small problem.
in my school they don't teach html/php/css stuff like that.
so i'm asking you guys.
how do i put a imagine as a background in a html.
how to use the css,something like,to put a link on a image, that thing with the pixels..widh lenght..
how do i make the connection between index.html and the css file
thanks a lot :)


2uqjeog.pngsteam.gifdqkuoo.png

Comments

  • Hey guys
    i have a small problem.
    in my school they don't teach html/php/css stuff like that.
    so i'm asking you guys.
    how do i put a imagine as a background in a html.
    how to use the css,something like,to put a link on a image, that thing with the pixels..widh lenght..
    how do i make the connection between index.html and the css file
    thanks a lot :)


    I'm going to assume you use your own folder and subfolders correctly so here it goes:

    First, to connect your css to your html/php you need to have these lines in the <head> tags:

    <link href = "css/whereever.css" rel = "stylesheet" type = "text/css" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    also make sure you have this at the top before you html tags:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

    Putting an image as a background is easy, making it fit and look good is hard. The code I usually use to do it is under the 'body' style in my css. Use this code there:

    body{
    background-color: #000000; /* black */
    background-image: url('location of file');
    }

    If you are putting it straight into your HTML then *I think* its just something like:

    <table border = "0" background = "image location" >

    To put a link on an image is not in css. You simply incorporate a picture as the 'text' for the link:

    <a href = "http://www.blah.com"&gt; <img src = "blah/images.jpg" alt = "meeeop" /> </a>

    That pretty much should be it.
  • Kahlann wrote: »
    I'm going to assume you use your own folder and subfolders correctly so here it goes:

    First, to connect your css to your html/php you need to have these lines in the <head> tags:

    <link href = "css/whereever.css" rel = "stylesheet" type = "text/css" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    also make sure you have this at the top before you html tags:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

    Putting an image as a background is easy, making it fit and look good is hard. The code I usually use to do it is under the 'body' style in my css. Use this code there:

    body{
    background-color: #000000; /* black */
    background-image: url('location of file');
    }

    If you are putting it straight into your HTML then *I think* its just something like:

    <table border = "0" background = "image location" >

    To put a link on an image is not in css. You simply incorporate a picture as the 'text' for the link:

    <a href = "http://www.blah.com"&gt; <img src = "blah/images.jpg" alt = "meeeop" /> </a>

    That pretty much should be it.
    Code me a hack?
  • Kahlann wrote: »
    I'm going to assume you use your own folder and subfolders correctly so here it goes:

    First, to connect your css to your html/php you need to have these lines in the <head> tags:

    <link href = "css/whereever.css" rel = "stylesheet" type = "text/css" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    also make sure you have this at the top before you html tags:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

    Putting an image as a background is easy, making it fit and look good is hard. The code I usually use to do it is under the 'body' style in my css. Use this code there:

    body{
    background-color: #000000; /* black */
    background-image: url('location of file');
    }

    If you are putting it straight into your HTML then *I think* its just something like:

    <table border = "0" background = "image location" >

    To put a link on an image is not in css. You simply incorporate a picture as the 'text' for the link:

    <a href = "http://www.blah.com"&gt; <img src = "blah/images.jpg" alt = "meeeop" /> </a>

    That pretty much should be it.

    thanx
    i'm using a paid webhosting.
    that thing with link on image i know it.but i want to add a link on the image,well the entire website is a background,and i want to add some link on some image parts.i will pm you with the background * can't post it here *xD