Adding logo image to css in wordpress theme

Discussion in 'CSS' started by netgo, Apr 19, 2010.

  1. #1
    I would like to add the file logo to my css.
    I've tried adding it in several places but nothing happens.

    /*
    Theme Name: Blue Green
    Theme URI: http://www.blogohblog.com/
    Description: Blue Green is a 3 column Wordpress theme.
    Author: Bob
    Author URI: http://www.blogohblog.com/

    I love to hear of my work being used :). This work is licensed under a <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 License</a>. This means you may use it for any purpose, and make any changes you like. Just leave my Bob link under your footer :)

    */

    body{font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px;background-color:#fff;background-image:url(images/topbck.gif);background-repeat:repeat-x;color:#666;margin:0;padding:0;}
    #wrap{width:980px;margin:0 auto;padding:0;}
    #top{height:69px;width:980px;clear:both;margin:0 auto;padding:0;}
    h2,h3{font-size:18px;font-weight:700;text-align:left;margin:0;padding:0;}
    #main{width:980px;margin:10px auto;padding:0;}
    #header{width:400px;height:78px;float:left;margin:0;padding:0; }
    #header h1.blogtitle{font-family:Arial, Helvetica, sans-serif;color:#fff;margin:0;padding:10px 0 0;background: url(images/logo.png) no-repeat left top;}
    #header p.desc{font-family:Verdana, Arial, Helvetica, sans-serif;color:#fff;font-size:11px;margin:0;padding:0;}
    #nav{height:78px;float:right;width:550px;margin:0;padding:0;}
    ul.nav{height:78px;line-height:78px;float:right;list-style:none;font-size:11px;text-transform:uppercase;margin:0;padding:0;}
    ul.nav li{float:left !important;list-style-type:none;margin:0;padding:0;}
    ul.nav li a,ul.nav li a:link,ul.nav li a:visited{color:#0C304A;float:left;display:block;text-decoration:none;padding:0 10px;}
    ul.nav li a:hover,ul.nav li a:active{background:#fff;color:#205387;text-decoration:none;}
    ul.nav li.current_page_item a{text-decoration:none;background:url(images/nav.gif) repeat-x;color:#000;}
    ul.nav li ul{float:left;margin:0;padding:0;}
    #content{width:580px;float:left;margin:0;padding:20px 0 0;}
    .entry{font-size:11px;float:left;width:550px;text-align:justify;margin:0;padding:0 0 30px;}
    .entry img{max-width:100%;padding:5px;}
    #sidebar{float:right;width:400px;margin:0;padding:20px 0 0;}
    .rsidebar{float:right;width:180px;overflow:hidden;margin:0;padding:0;}
    .postmetadata{background:#eee;border-bottom:1px #ccc solid;border-top:1px #eee solid;font-size:10px;margin:0;padding:5px;}
    .boxcomments{border-top:5px solid #ddd;border-bottom:5px solid #ddd;margin-bottom:20px;width:510px;}
    #commentform{border-top:1px solid #eee;margin:0;padding:15px 15px 1px;}
    #commentform label{display:block;margin:0;}
    #commentform input{width:170px;margin:0 5px 10px 0;padding:1px;}
    #commentform textarea{width:400px;margin:0 0 10px;padding:0;}
    #commentform #submit{margin:0 0 20px;}
    #commentform p{margin:5px 0;}
    ol.commentlist{margin:0 0 1px;padding:0;}
    ol.commentlist :hover{background:url(images/latestbck.gif) repeat-x;}
    ol.commentlist li{border-top:1px solid #eee;display:block;list-style:none;margin:0;padding:15px 15px 1px;}
    ol.commentlist li :hover{background:none;}
    ol.commentlist li.commenthead{display:block;list-style:none;margin:0;padding:5px 15px;}
    ol.commentlist li.commenthead h2{margin:0;}
    ol.tblist{border-top:1px solid #fff;list-style:none;margin:0 0 1px;padding:15px;}
    ol.tblist li{display:block;list-style:none;background:transparent url(images/c.gif) 0 2px no-repeat;padding-left:15px;margin:0 0 5px;}
    #eof{width:980px;clear:both;height:20px;background:#fff;margin:0 auto;padding:0;}
    .navigation{width:500px;float:left;color:#666;}
    .alignright{float:right;margin-top:10px;}
    .alignleft{float:left;margin-top:10px;}
    #footer{background:#f5f5f5 url(images/footerbck.gif) repeat-x;height:31px;line-height:31px;clear:both;}
    .footer{width:980px;text-align:center;font-size:11px;margin:0 auto;padding:0;}
    a:link,a:active,a:visited,a:hover{text-decoration:none;color:#356aa0;border:none;}
    #header h1 a:link,#header h1 a:active,#header h1 a:visited,#header h1 a:hover{text-decoration:none;color:#fff;border:none;}
    .lsidebar{float:left;width:180px;margin:0;padding:0;}
    .lsidebar ul li{display:inline;margin:0;padding:0;}
    img{border:none;}
    acronym,abbr,span.caps{cursor:help;font-size:0.9em;letter-spacing:.07em;}
    acronym,abbr{border-bottom:1px dashed #999;}
    blockquote{padding-left:20px;border-left:5px solid #ddd;margin:15px 30px 0 10px;}
    blockquote cite{display:block;margin:5px 0 0;}
    code{font:1.1em 'Courier New', Courier, Fixed;}
    img.centered{display:block;margin-left:auto;margin-right:auto;}
    img.alignright{display:inline;margin:0 0 2px 7px;padding:4px;}
    img.alignleft{display:inline;margin:0 7px 2px 0;padding:4px;}
    .line{width:500px;float:left;border-bottom:#e2e2e0 1px solid;margin:0 0 10px;padding:10px 0 5px 2px;}
    #searchform{text-align:center;margin:0 auto;padding:0 0 10px;}
    #sidebar #searchform #s{width:90%;padding:2px;}
    #sidebar #searchsubmit{padding:1px;}
    .rsidebar h2,.lsidebar h2{background:url(images/h2sidebar.gif) repeat-x;height:29px;font-size:13px;font-weight:700;color:#fff;line-height:29px;border:1px solid #ddd;margin:0 0 10px;padding:0 0 0 10px;}
    .lsidebar ul,.rsidebar ul{list-style:none;margin:0;padding:0 0 20px;}
    .lsidebar ul li a,.rsidebar ul li a{display:block;color:#000;text-decoration:none;border-bottom:1px solid silver;margin:0;padding:5px 0 5px 8px;}
    .lsidebar ul li a:hover,.rsidebar ul li a:hover{background:#EFEFEF;color:#25A;}
    .center{text-align:center;}
     
    netgo, Apr 19, 2010 IP
  2. grandpa

    grandpa Active Member

    Messages:
    185
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    75
    #2
    #header h1.blogtitle{font-family:Arial, Helvetica, sans-serif;color:#fff;margin:0;padding:10px 0 0;background: url(images/logo.png) no-repeat left top;}

    dont forget to refresh the browser (ctrl+f5)
     
    grandpa, Apr 19, 2010 IP
  3. netgo

    netgo Active Member

    Messages:
    279
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    75
    #3
    No, that doesn't work - no logo appears
     
    netgo, Apr 20, 2010 IP
  4. javier.garcia.esteban

    javier.garcia.esteban Well-Known Member

    Messages:
    66
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    118
    #4
    Are you sure the code returned is matching the CSS?. This is, is there a <div id="header"> and a <H1 class="blogtitle"> inside?.

    If not, adapt the CSS to match your HTML, but the "background-image: url(images/logo.png)" is what you need to include an image in a given element.

    Or you just can add a simple <IMG> in your theme...
     
    javier.garcia.esteban, Apr 20, 2010 IP
  5. netgo

    netgo Active Member

    Messages:
    279
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    75
    #5
    I am not sure what you mean - I have copied here the entire CSS.

    How can I add a simple <img> in the header of my theme?
     
    netgo, Apr 20, 2010 IP
  6. javier.garcia.esteban

    javier.garcia.esteban Well-Known Member

    Messages:
    66
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    118
    #6
    But we don't know your HTMl so we don't know how to "call" your header...

    Just insert the tag in the appropriate section of your (most likely) header.php file.
     
    javier.garcia.esteban, Apr 20, 2010 IP
  7. netgo

    netgo Active Member

    Messages:
    279
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    75
    #7
    Thanks!! the second thing worked, I just called the image from the header.php and it worked!
     
    netgo, Apr 20, 2010 IP
  8. kishor212

    kishor212 Guest

    Messages:
    124
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Go To Theme Editor..! Click Header.php

    And pOst what is there..!

    I can Help You then...! :)

    Thats The easiest way of editing Themes Or Adding extras..!
     
    kishor212, Apr 20, 2010 IP
  9. bibby

    bibby Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    i was wondering if it's possible to replace the name of the blog on the page with a logo instead. so..for example replacing the bib and sola writing on the left with the logo
    the website is bibandsola.com
     
    bibby, Jun 29, 2010 IP
  10. Paulmo

    Paulmo Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    yeh it's in the header .php file, some themes that you use such as vigilence have a fature bulit in the back end to handle this
     
    Paulmo, Jun 30, 2010 IP