Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP How to Build a WordPress Theme Converting Static HTML into WordPress Templates Coding the Header and Footer Templates

Dharmesh Sheth
Dharmesh Sheth
2,547 Points

Adding image as a logo

hi there for my logo, i want add a image instead of text. How do i do that?

1 Answer

geoffrey
geoffrey
28,736 Points

It depends.

You have basically two ways to add your logo in your website.

First one is using HTML and so the <img/> tag. The second way is by using css like the Shirts4Mike website.

using html

<img src="img/yourlogo.jpg" alt="description"/>

Using css, with the background property, here is a copy past from Mike's CSS.

.header .branding-title {
float: left;
margin: 0 0 0 12px;
font: 0/0 serif;
text-shadow: none;
color: transparent;
width: 122px;
height: 77px;
background: url(../img/branding-title.png) 0 14px no-repeat;
padding: 14px 0;
}

Hope it helps.