image has border

Anything questions related to styling should go in here.
Post Reply
bowersbros
Posts: 534
Joined: Thu May 05, 2011 8:19 pm

image has border

Post by bowersbros »

http://thetutspace.org/beta/

basically, the <img> tags have a border. Any ideas how to get rid of it? I use a CSS reset which normally gets rid of it, and img { border: 0 !important; doesnt work.. :/
I don't like to brag, but I wasn't circumcised. I was circumnavigated. ;)

Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
User avatar
EcazS
Posts: 789
Joined: Fri May 06, 2011 5:29 pm

Re: image has border

Post by EcazS »

Looks like a link. Did you try, a img {border: 0} ?
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: image has border

Post by jacek »

You need to set it for the a tag
a, img {
    border: none;
}
Image
bowersbros
Posts: 534
Joined: Thu May 05, 2011 8:19 pm

Re: image has border

Post by bowersbros »

didnt work. But, it is a link by image map, if that helps atall? :/
I don't like to brag, but I wasn't circumcised. I was circumnavigated. ;)

Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
bowersbros
Posts: 534
Joined: Thu May 05, 2011 8:19 pm

Re: image has border

Post by bowersbros »

It may be worth noting that the small fountain which has one of these isnt a link atall, just an img tag.

Also, if you look now you'll see hover states for all the buildings, but the wall because it is a large image, has the hover state when all of it is hovered, even the transparent. ive tried applying it to the area tag (which is part of the image map) but that doesnt work. Any other ideas would be great! :D
I don't like to brag, but I wasn't circumcised. I was circumnavigated. ;)

Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: image has border

Post by jacek »

I don't actually see any borders :S ?
Image
bowersbros
Posts: 534
Joined: Thu May 05, 2011 8:19 pm

Re: image has border

Post by bowersbros »

screenshot please? and ill upload one too

/edit here:
Untitled-2.jpg
Untitled-2.jpg (490.26 KiB) Viewed 8149 times
I don't like to brag, but I wasn't circumcised. I was circumnavigated. ;)

Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
bowersbros
Posts: 534
Joined: Thu May 05, 2011 8:19 pm

Re: image has border

Post by bowersbros »

bowersbros wrote:It may be worth noting that the small fountain which has one of these isnt a link atall, just an img tag.

Also, if you look now you'll see hover states for all the buildings, but the wall because it is a large image, has the hover state when all of it is hovered, even the transparent. ive tried applying it to the area tag (which is part of the image map) but that doesnt work. Any other ideas would be great! :D
Fixed the wall problem, used the image map and changed the class via that.

Um.

Still confused on the image border problem
I don't like to brag, but I wasn't circumcised. I was circumnavigated. ;)

Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
bowersbros
Posts: 534
Joined: Thu May 05, 2011 8:19 pm

Re: image has border

Post by bowersbros »

Right, apparently the borders only show in Chrome. and the image map for the wall doesnt work in FF but does in IE , chrome and safari.
I don't like to brag, but I wasn't circumcised. I was circumnavigated. ;)

Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Torniquet
Posts: 52
Joined: Sun Jun 19, 2011 8:10 am
Contact:

Re: image has border

Post by Torniquet »

ok after playing about with it. It seems to be a problem with that you are using a class to give and img tag a background image through css. i added a src attribute to the 2 affected images to supply the image sources and it cleared the weird borders up, however it does mess up the hover on the wall. maybe abit of jquery/js to edit the src attribute.

this is in chrome btw

Image
<img src="images/city/buildings/normal/wall.png" class="wall" />
should fix your problems, likewise the same with the fountain. you just need to formulate the hover...
$('.wall').mouseover(function(){
   $(this).attr('src','images/city/buildings/hover/wall.png');
}
$('.wall').mouseoout(function(){
   $(this).attr('src','images/city/buildings/normal/wall.png');
}
maybe?
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: image has border

Post by jacek »

Are you sure that is not the outline ?

Try
outline: none;
Image
Torniquet
Posts: 52
Joined: Sun Jun 19, 2011 8:10 am
Contact:

Re: image has border

Post by Torniquet »

Nope that didnt work either.

Applying what i have put should also fix the FF issue aswell ;)
bowersbros
Posts: 534
Joined: Thu May 05, 2011 8:19 pm

Re: image has border

Post by bowersbros »

unfortunately, the imagemap still doesnt seem to work, and it needs to, sicne the whole image cant be a link, only the bits i need it to be, whic hare defined within the image map
I don't like to brag, but I wasn't circumcised. I was circumnavigated. ;)

Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: image has border

Post by jacek »

You can position a tags like any other tag. So you can use one image and put the links on top of it ?
Image
bowersbros
Posts: 534
Joined: Thu May 05, 2011 8:19 pm

Re: image has border

Post by bowersbros »

The wall being circular I only want the actual graphic of the wall to be a link, thus an image map is used, since there you define the coordinates for the poly shape. because if i used a generic link, it would make the entire square that the image is in clickable, which isnt suitable for my needs.
I don't like to brag, but I wasn't circumcised. I was circumnavigated. ;)

Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
User avatar
EcazS
Posts: 789
Joined: Fri May 06, 2011 5:29 pm

Re: image has border

Post by EcazS »

I'm starting to think that you can't remove it. I tried img, map, area and nothing works
peterr
Posts: 12
Joined: Wed Oct 12, 2011 8:00 pm

Re: image has border

Post by peterr »

If you don't want borders around the images you can try this:
<img src="url/your image" border="0"><img>
You just add border="0" just after the img src="" and it should work. I had the same problem with IE. Purple borders appeared around all the images, but when I added border="0" in the HTML, it worked.
User avatar
EcazS
Posts: 789
Joined: Fri May 06, 2011 5:29 pm

Re: image has border

Post by EcazS »

Did you even bother to read all posts? Doing border: 0px/none; would be the same thing as doing what you did.
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: image has border

Post by jacek »

The border attribute is not valid XHTML, it was essentially replace with CSS.
Image
peterr
Posts: 12
Joined: Wed Oct 12, 2011 8:00 pm

Re: image has border

Post by peterr »

I have a site which is XHTML valid and I have used the border="0" attribute.
User avatar
EcazS
Posts: 789
Joined: Fri May 06, 2011 5:29 pm

Re: image has border

Post by EcazS »

peterr wrote:I have a site which is XHTML valid and I have used the border="0" attribute.
It's valid if you're NOT using Strict....
Post Reply