0

Basicly I have defined an img tag to have a black border around it using this bit of code.

img {border:4px solid; color:#000000 }

I was going to use a text based logo but have used a non standard font so it looks rubbish. I now need to design a logo which i have done, but beacuse of the code above it has a box round it.(im just inserting it in <img></img> tags)

Is there anyway i can stop this happening eihter by telling a paticular inmstance of a tag to ignore that bit of CSS or by creating a new tag to handle the logo.

I have tried doing it like this .logo{ image: url(graphics/logo1.gif) } and the n using a span tag but that doesn't work.

so umm any ideas???

4
Contributors
6
Replies
7
Views
12 Years
Discussion Span
Last Post by Rashakil Fol
0

Remember that the "C" in CSS stands for "Cascading". That means there is a hierarchy of styles. If two style definitions conflict, the most specific wins. So for a particular img, if you wish to override the class definition, then provide an inline definition for that image.

0

i see what your saying but can't work out the code. im trying.
<img src="graphics/logo1.gif" width="234" height="134" border:0px> as the img tag but it is not overiding it. what am i doing wrong.

0

i see what your saying but can't work out the code. im trying.
<img src="graphics/logo1.gif" width="234" height="134" border:0px> as the img tag but it is not overiding it. what am i doing wrong.

It is supposed to be like this

<img src="graphics/logo1.gif" width="234" height="134" style="border:0px;">

With inline declaration you have to call "style" for CSS and then change parameters.

0

Exactly, I should have been more clear. You have to use the "style" property, and the value contains your delimited style declarations. Thanks, Peter.

0

ahh that makes sense. will have to try and remember tht one. cheers to you both.

0

Also, I recommend learning about the use of 'classes' and 'ids' involving CSS, since trying to use CSS without classes or ids is like trying to play the piano without any fingers.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.