Any Wordpress Pro's Around Willing to Help

Status
Not open for further replies.

Garrett

music LOUD
Feb 4, 2008
3,847
131
0
I have been fucking with PHP/CSS for awhile now I can't seem to figure anything out. I am trying to overlay a logo within header.php.

My header.php file looks like this ( I deleted the Doctype and all that shit so it is easier for you to read):
</head>
<body>

<div id="header">


<div class="description">
<p><?php bloginfo('description'); ?></p>

</div>

</div>

<div id="top-menu">
<ul>
<?php wp_list_pages('depth=1&title_li='); ?>
</ul>
</div>

<div id="container">
<div class="page">
....and the CSS:

#header{
clear: both;
float: left;
width: 100%;
padding: 30px 0 20px 0;
text-align: left;
background: #1f1f1f;

}

#header h1{
margin: 0 auto;
width: 758px;
font-size: 48px;
color: #fff;
}

#header h1 a{
text-decoration: none;
color: #fff;
}

#header h1 a:hover{
text-decoration: underline;
}

.description{
margin: 0 auto;
width: 758px;
line-height: 24px;
color: #6d6d6d;


}

.description p{
padding: 6px 0 0 20px;

I am trying to place the logo next to (or in place of) the "Just another Wordpress weblog" tagline. I am targeting the "description div" and trying to place a image there. The image is really small (like 100px x 100px). I have tried to use backround: url('images/logo.gif'); in the CSS and <img src="images/logo.gif" alt="logo" /> in header.php. I can't figure out what I am doing wrong. If someone would help a self-taught fool like myself and tell me what I am doing wrong, I would be forever grateful.
 


The path to the image should be relative to where the CSS file is located.
 
That is not the problem. I have the correct path.

I am just getting used to dealing with so many divs and how they inherit shit.
 
I would try changing this:

.description{
margin: 0 auto;
width: 758px;
line-height: 24px;
color: #6d6d6d;
}

to this:

.description{
width: 100px;
height: 100px;
background-image: url(http://yourdomain.com/path-to-image/image.jpg");
}

Change the width/height to be a lil bigger than your actual image size.
 
Definitely try adding some height to your description tag definition. The background: url.... looked right.
 
If you are going to use a CSS based image instead of the Wordpress call "bloginfo", there is no need to have <p><?php bloginfo('description'); ?></p> in your template.

All you need is

<div class="description"></div>

If you are not using H1 in your header, you can remove all instances of it from your CSS file. Also .description p is missing the closing } in your code above.

If you have any other questions feel free to post.
 
Status
Not open for further replies.