4 replies [Last post]
nootkan
nootkan's picture
Offline
newbie
Gold River, B.C. Canada
Last seen: 6 years 42 weeks ago
Gold River, B.C. Canada
Timezone: GMT-8
Joined: 2006-11-15
Posts: 9
Points: 13

Been trying to add a logo to my header in a form which already has used css3 to add a gradient background but cannot seem to get it to work. Can anyone help me with this?

html:

<div id="formHeader">
		        <img class="logo">
		        <h2 class="formInfo">Vife Contact</h2>
			<p class="formInfo"></p>
		</div>

css:

#formHeader
{
	position: relative;
	width: 100%;
	height: 30%;
	background: #0071ce;
    background-image: -webkit-gradient(linear, 1% 1%, 1% 100%, from(#f7e0a5), to(#0071ce));
    background-image: -webkit-linear-gradient(top, #f7e0a5, #0071ce);
    background-image: -moz-linear-gradient(top, #f7e0a5, #0071ce);
    background-image: -ms-linear-gradient(top, #f7e0a5, #0071ce);
    background-image: -o-linear-gradient(top, #f7e0a5, #0071ce);
}
logo.formHeader
{
    background-image: url(imgs/logo2.png) no-repeat top left;
}

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 6 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

Hi

Hi nootkan,

logo.formHeader
{
    background-image: url(imgs/logo2.png) no-repeat top left;
}

should be:
#formHeader .logo
{
    background-image: url(imgs/logo2.png) no-repeat top left;
}

nootkan
nootkan's picture
Offline
newbie
Gold River, B.C. Canada
Last seen: 6 years 42 weeks ago
Gold River, B.C. Canada
Timezone: GMT-8
Joined: 2006-11-15
Posts: 9
Points: 13

Hi Tony, thanks for the reply

Hi Tony, thanks for the reply however that didn't work either. Puzzled

Here is a link to the form if that helps.Email Form

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 6 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

Hi I think what you need is

Hi
I think what you need is to add a src to the image otherwise it won't be displayed.

<img class="logo" src="imgs/logo2.png" />

Then you won't eed the background image.

nootkan
nootkan's picture
Offline
newbie
Gold River, B.C. Canada
Last seen: 6 years 42 weeks ago
Gold River, B.C. Canada
Timezone: GMT-8
Joined: 2006-11-15
Posts: 9
Points: 13

Thank you Tony, that did the

Thank you Tony, that did the trick. Much appreciated. Big smile