Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Apr 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Putting up a header image

    I have this css template where I'm trying to put an image in for the title but can't seem to get it to work. Here's the code I'm working with:

    * { padding: 0; margin: 0; }

    body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    }
    #wrapper {
    margin: 0 auto;
    width: 922px;

    }
    #header {

    <img src="DATUlogo.jpg" width="945" height="99" align="right">

    }
    #leftcolumn {
    color: #333;
    border: 1px solid #ccc;
    background: #CCFF33;
    margin: 0px 5px 5px 0px;
    padding: 10px;
    height: 350px;
    width: 195px;
    float: left;
    }
    #rightcolumn {
    float: right;
    color: #333;
    border: 1px solid #ccc;
    background: #F2F2E6;
    margin: 0px 0px 5px 0px;
    padding: 10px;
    height: 350px;
    width: 678px;
    display: inline;
    }
    #footer {
    width: 900px;
    clear: both;
    color: #333;
    border: 1px solid #ccc;
    background: #669933;
    margin: 0px 0px 10px 0px;
    padding: 10px;
    }
    Appreciate the help.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,742
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello sweeming,
    That is HTML you are putting in your CSS #header entry. If you want that image to be a background of your header, try it like this -

    Code:
    #header {
    height: 99px;
    width: 945px;
    background: url(DATUlogo.jpg);
    }
    CSS backgrounds here.



    ,
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    New to the CF scene
    Join Date
    Apr 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Excavator View Post
    Hello sweeming,
    That is HTML you are putting in your CSS #header entry. If you want that image to be a background of your header, try it like this -

    Code:
    #header {
    height: 99px;
    width: 945px;
    background: url(DATUlogo.jpg);
    }
    CSS backgrounds here.



    ,
    Thanks, that works great!
    Last edited by sweeming; 04-10-2011 at 06:22 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •