help with coding

Discussion in 'CSS' started by webspider20, Nov 1, 2009.

  1. #1
    I need help coding my background. How can I code an image on all my pages? Here is my site
     
    webspider20, Nov 1, 2009 IP
  2. Darkhodge

    Darkhodge Well-Known Member

    Messages:
    2,111
    Likes Received:
    76
    Best Answers:
    1
    Trophy Points:
    185
    #2
    If you want to add an image for your background then change:

    
    body {
    	font-size: 62.5%; /* What did one em say to another? Who's your daddy?! */
    	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
    	color: #333;
    	text-align: left;
    	margin: 0 0 20px 0;
    	padding: 0;
    	background-color: #ccccff;
    }
    
    Code (markup):
    To this:

    
    body {
    	font-size: 62.5%; /* What did one em say to another? Who's your daddy?! */
    	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
    	color: #333;
    	text-align: left;
    	margin: 0 0 20px 0;
    	padding: 0;
    	background: #ccccff url("IMAGEURLHERE");
    }
    
    Code (markup):
    You can also specify the repetition of the image, the location where it starts etc... with that one line. You'll probably find this article useful on background CSS:

    http://www.w3schools.com/css/css_background.asp


    Regards,

    Hodge
     
    Darkhodge, Nov 1, 2009 IP
  3. dabzo

    dabzo Peon

    Messages:
    188
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yep, what he said.

    body {
    font-size: 62.5%; /* What did one em say to another? Who's your daddy?! */
    font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
    color: #333;
    text-align: center; /* Use the force Luke */
    margin: 0;
    padding: 0;
    background: #CCF url("IMAGEURLHERE");
    }
     
    dabzo, Nov 2, 2009 IP