how can create the colour background in css?

Discussion in 'HTML & Website Design' started by anitarana, Mar 4, 2014.

  1. #1
    hi
    plz
    can help me how can create colour of background and image of css ?
     
    anitarana, Mar 4, 2014 IP
  2. competent123

    competent123 Notable Member

    Messages:
    1,752
    Likes Received:
    71
    Best Answers:
    6
    Trophy Points:
    255
  3. anitarana

    anitarana Greenhorn

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #3
    thanks for informations site
     
    anitarana, Mar 4, 2014 IP
  4. HassanKhalid

    HassanKhalid Active Member

    Messages:
    158
    Likes Received:
    6
    Best Answers:
    4
    Trophy Points:
    90
  5. Python1.com Hosting

    Python1.com Hosting Greenhorn

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #5
    If you still need this done, let me know i will do it for free.
     
    Python1.com Hosting, Mar 5, 2014 IP
  6. John Michael

    John Michael Member

    Messages:
    154
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #6
    In my opinion the best way to learn about CSS properties you visit w3scools.com there every properties is explain with example. Here http://www.csstutorial.net/ is all about CSS. If you need to use image and color both the use this properties.
    .test{
    background:url(images.jpg) #cccccc;
    }
     
    John Michael, Mar 5, 2014 IP
  7. Imran Shariff

    Imran Shariff Member

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    31
    #7
    to add color in background here are some eg: for you... In this case I will take body and apply to it.

    Since body is HTML element we are not going to add class(.) or id(#) but we will mention as body itself.

    Applying color in the body
    body{background-color: #333333;}
    or your can also use like this to
    body{background:#333333;}

    Applying image to the background

    body{background-image:url(your image location goes here); background-repeat:repeat-y;}
    or you can use like this tooo.
    body{background:url(your image location goes here) repeat-y;}

    Hope you will find this helpful.
     
    Imran Shariff, Mar 6, 2014 IP
  8. Imran Shariff

    Imran Shariff Member

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    31
    #8
    One more thing you can also attach the color with the image so that if image does not exits the color will be filled.
    body{background:url(your image location goes here) repeat-y #333333;}
    or
    body{background-image:url(your image location goes here); background-repeat:repeat-y; background-color:#333333;}
     
    Imran Shariff, Mar 6, 2014 IP
  9. Johnolo

    Johnolo Member

    Messages:
    54
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    43
    #9
    http://www.w3schools.com/cssref/pr_background-color.asp

    color in the background body{background:#333333;}
    need anything else? hit me
     
    Johnolo, Mar 6, 2014 IP
  10. joti5678

    joti5678 Member

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #10
    you can use background as:
    if class name bg
    .bg{
    background: #000000 url("image link")
    }
     
    joti5678, Mar 9, 2014 IP
  11. Milosovic Bejdak

    Milosovic Bejdak Member

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #11
    Put this in your header

    <style>
    body {
    background-color:black
    }
    </style>
     
    Milosovic Bejdak, Mar 9, 2014 IP
  12. creativewebmaster

    creativewebmaster Active Member

    Messages:
    654
    Likes Received:
    7
    Best Answers:
    4
    Trophy Points:
    78
    #12
    Here is the perfect class with property of CSS may help you.

    .bgimage { background:url(images.jpg) #000000;}
     
    creativewebmaster, Mar 10, 2014 IP
  13. 9gagin

    9gagin Greenhorn

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #13
    Open your stylesheet which is basically a file with extension .css. Find body { } and enter color you want as the value of the attribute background. For example - body { background: violet;}, where violet is the color you want as your background color.
     
    9gagin, Mar 10, 2014 IP