...

View Full Version : Why do my images not size correctly ?



jeddi
04-07-2009, 08:32 PM
Hello

I have two images that have dimensions at
92px x 92px and at 120px x 120px

I want then displayed neatly next to each other so
I tried to give them dimensions via the CSS like
this:



<a href="about.php"><img class="seal" src="images/guarantee_gray.gif" alt="guarantee" title = "guarantee" ></a>
<a href="about.php"><img class="seal" src="images/money-back.gif" alt="money back" title = "money back" ></a>

and css:


.seal {
width: 90px;
height:90px;
}


Unfortunately they do not comply :confused:

They dsplay at there own normal size.

What have I done wrong ?

Any help appreciated !


Thanks :)

Fisher
04-07-2009, 09:22 PM
The code is valid. My guess would be a typo somewhere.

Is your CSS properly linked? Try putting it in the head of the code and see if it works.


<style type="text/css">
.seal {
width: 100px;
height:100px;
}
</style>

DarkLightA
04-07-2009, 09:35 PM
Try this. Tell me if it works:
<a href="about.php"><img style="width: 90px; height: 90px;" src="images/guarantee_gray.gif" alt="guarantee" title="guarantee" /></a>
<a href="about.php"><img style="width: 90px; height: 90px;" src="images/money-back.gif" alt="money back" title = "money back" /></a>

(Remember to close your <img />s)

If this doesn't work, just reply, and I'll try again. Maybe post the entire code?

jeddi
04-07-2009, 09:42 PM
The inline style works fine :) :thumbsup:

I will play about with it, thanks

DarkLightA
04-07-2009, 09:44 PM
Have you tried JUST adding a slash at the end of <img>?

EDIT: also, try changing .seal to img.seal in your CSS



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum