• Archives

  • Archive for the ‘CSS’ Category

    Set an image as a background of your website

    Wednesday, January 9th, 2008

    Well this one is the easiest tutorial for you all

    How to set an image as a background of your website

    Syntax 

    <html>
    <head>

    <style type=”text/css”>
    body
    {
    background-image:
    url(‘bg.gif’)
    }
    </style>

    </head>

    <body>
    </body>

    </html>

     Notice:

    background-image: url(‘bg.gif’)

    Just use the background image declaration followed by url of the image in between the braces

    Thanks

    krates

    Decorating the text through css

    Monday, January 7th, 2008

    Many a times we want to decorate the text. here are the Five main text decoration properties that can be used in your matter.

    <html>
    <head>
    <style type=”text/css”>
    h1 {text-decoration: overline}
    h2 {text-decoration: line-through}
    h3 {text-decoration: underline}
    h4{text-decoration: blink}
    a {text-decoration: none}

    </style>
    </head>
    <body>
    <h1>Something</h1>
    <h2>Something</h2>
    <h3>Something</h3>
    <h4>Something</h4>
    <p><a href=”http://www.easytutorial.info”>Something</a></p>

    </body>

    </html>

    Now see the text contained between h1 tag will have a line over it

    The text contained between the h2 tag will have a line throught it (Strike through) .

    The text contained between the h3 tags will have a underline

    The text contained between the h4 tags will blink

    The last one is a link this will have no underline

    Thanks

    krates

    Specifying the space between lines in css

    Monday, December 31st, 2007

    This tutorial is going to teach you how to specify space between lines

    This tutorial will teach you how to use line height character to specify space between two lines
    Create two files one

    line.html , style.css

    Line.html

    <html>

    <head>

    <link rel=”stylesheet” href=”style.css” />

    </head>

    <body>

    <p class=”less”>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In urna diam, interdum vel, varius id, fringilla eget, risus. Nam dui. Fusce sit amet lorem ut nulla tincidunt nonummy. Vivamus vitae ante tristique felis nonummy lobortis. Praesent sodales dui in</p>

    <p class=”more”>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In urna diam, interdum vel, varius id, fringilla eget, risus. Nam dui. Fusce sit amet lorem ut nulla tincidunt nonummy. Vivamus vitae ante tristique felis nonummy lobortis. Praesent sodales dui in</p>

    </body>

    </html>

    Style.css 

    p.less {

    line-height: 100%;

    }
    p.more {

    line-height: 200%;

    }

    Thanks

    krates

    Simple css coding

    Saturday, December 8th, 2007

    Html was designed to display information but it does not have any style in the need of style they designed css

    Cascading style sheets

    Which save a lot of coding work

    Syntax

    The syntax is very easy and made up of three parts

    selector {property: value}

    For ex

    body {
    color: red;
    }
    
    

    For using css with html you have to declare class in html for the element you want to do css coding

    <p class="example">
    
    This paragraph can not be changed but style can be:D
    </p>

    In css you will write

    p.exapmle{

    text-align: center;

    }

    This will center the text

    Thanks

    Krates