The Mother Board
CSS question (why don't my graphics show in IE?)
Goto page 1, 2  Next
 
Post new topic   Reply to topic    The Mother Board Forum Index -> Programming
View previous topic :: View next topic  
Author Message
filecore
Black Belt 1st Degree
Black Belt 1st Degree


Joined: 29 Dec 2003
Posts: 1092
Location: Trapped inside a virtual machine.

PostPosted: Thu Jun 19, 2008 4:29 am    Post subject: CSS question (why don't my graphics show in IE?) Reply with quote

Okay, here's the deal. If you go to www.hnnky.fi/test/ in Firefox, you'll see a graphical link on the last line of the main section, to helsingin.nnky@ the domain. I've achieved this through CSS, because in my HTML I have things like these:

Code:
<a href="mailto:blah@domain.com"></a>

Code:
<a href="mailto:hnnky@domain.com"></a>

Code:
<a href="mailto:woo@domain.com"></a>


For each of those - blah, hnnky, and woo, in this case - I have created a rule in CSS like this:

Code:
a[href ^="mailto:hnnky"] {
   padding: 5px 80px 5px 0;
    background: transparent url(/ims/email-hnnky-at-hnnky-fi.jpg) no-repeat center right;
}


The underlying logic is that when the file is parsed, the CSS sees the "mailto:hnnky", and anything starting with that string has a graphic inserted into it. In Firefox this displays perfectly well. However, in IE I have had varying reports on the effects; some claim that nothing happens at all, while my own observations (both in IE and with IETabs in FF) are that the link is there, with the given amount of pixels, but the graphic itself is invisible. I'm not sure why it works in FF and not in IE; can anybody give me any hints, or a workaround, or even a better piece of code to use?

My original intention was simply to replace the text content of the links with a graphic of the email address, but I wanted to do it centrally with rather than per file with an img. If I were using an HTML img tag, it would be easier because the alt text would replace any non-displaying image, but I don't think there's a CSS way to do alt tags. It's probably all some ghastly FF hack anyway, so I'd like some helpful, knowledgeable person's feedback please big grin

IE 7
FF 2.0.0.14
_________________
Home server: Asus P5Q Pro, Core2Quad, 8GB DDR2, ENGTX260 876MB, Zalman 800w, Antec P180 case, 2x1TB and 2x2TB Samsung Spinpoint F1, Windows 7 64-bit, etc

Work server: HP ProLiant ML350 G6, hexacore Xeon E5645 2.4GHz (12 logical cores), 16GB DDR3, 3x300GB SAS RAID5, Server 2008 R2, nVidia GT560Ti 1GB for Hyper-V RemoteFX acceleration


Last edited by filecore on Thu Jun 19, 2008 4:43 am; edited 1 time in total
Back to top
View user's profile Send private message
filecore
Black Belt 1st Degree
Black Belt 1st Degree


Joined: 29 Dec 2003
Posts: 1092
Location: Trapped inside a virtual machine.

PostPosted: Thu Jun 19, 2008 4:41 am    Post subject: Reply with quote

Curious. On this page, http://www.hnnky.fi/test/contact.shtml, you can see four email addresses (although only in FF, natch). All of them were with graphics, but since I played with the first one, it seems to have magically vanished. The other three are still extant. I can't work this out. I suspect it's to do with my having nothing between the <a href="mailto:whatever"> and the </a>; but if I put something in, the graphic is overridden by the text anyway.
_________________
Home server: Asus P5Q Pro, Core2Quad, 8GB DDR2, ENGTX260 876MB, Zalman 800w, Antec P180 case, 2x1TB and 2x2TB Samsung Spinpoint F1, Windows 7 64-bit, etc

Work server: HP ProLiant ML350 G6, hexacore Xeon E5645 2.4GHz (12 logical cores), 16GB DDR3, 3x300GB SAS RAID5, Server 2008 R2, nVidia GT560Ti 1GB for Hyper-V RemoteFX acceleration
Back to top
View user's profile Send private message
Deman Risu
Pilgrim
Pilgrim


Joined: 30 Sep 2009
Posts: 6

PostPosted: Wed Sep 30, 2009 6:33 pm    Post subject: Reply with quote

Why don't you make an IE version of your page:

"This page doesn't work with Internet Explorer because it sucks. Switch to Firefox, Chrome, Safari, or Opera and try again."
Back to top
View user's profile Send private message
fussnfeathers
Mobo-fu Master
Mobo-fu Master


Joined: 04 Dec 2008
Posts: 3124
Location: Right behind you

PostPosted: Thu Oct 01, 2009 11:27 am    Post subject: Reply with quote

You just have the typical issue of IE not using standard programming. The majority of programs in the last few years have worked around that, but you still have to code for IE, and then slightly differently for everything else.

The ironic thing is that with IE8, MS decided to go with the true HTML standard, which means that everything coded for their incompatible versions of IE have to be recoded. Again.
_________________
Faster than the speed of snot

and for the million hours that we were....well I'll smile and remember them all, then I'll turn and go....
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
filecore
Black Belt 1st Degree
Black Belt 1st Degree


Joined: 29 Dec 2003
Posts: 1092
Location: Trapped inside a virtual machine.

PostPosted: Thu Oct 01, 2009 11:48 am    Post subject: Reply with quote

Wow, old thread. I think I solved the problem eventually but I can't be bothered checking to see right now. Sorry! It's late where I am lachen

The problem, annoyingly, is not so much that it's different rules in IE - coding an alternative is one thing - but that it's utterly inconsistent and doesn't necessarily work the same two times in a row. Surely that ought not to be?

That said, Expression Web is more or less standards compliant, and actually fairly decent; hopefully it will finally be a death knell for the horror that is FrontPage...
_________________
Home server: Asus P5Q Pro, Core2Quad, 8GB DDR2, ENGTX260 876MB, Zalman 800w, Antec P180 case, 2x1TB and 2x2TB Samsung Spinpoint F1, Windows 7 64-bit, etc

Work server: HP ProLiant ML350 G6, hexacore Xeon E5645 2.4GHz (12 logical cores), 16GB DDR3, 3x300GB SAS RAID5, Server 2008 R2, nVidia GT560Ti 1GB for Hyper-V RemoteFX acceleration
Back to top
View user's profile Send private message
evasive
Mobo-fu Master
Mobo-fu Master


Joined: 06 May 2001
Posts: 36705
Location: Netherlands, Breda

PostPosted: Thu Oct 01, 2009 12:01 pm    Post subject: Reply with quote

There's no irony in data generated with/for previous versions of M$ software being incompatible with the current version. I really think that is by design so they have to write some cr*ppy conversion software wizard that fubars your data and you have to rebuild it by hand or export to csv first eek
_________________
We hate rut, but we fear change.



System error, strike any user to continue...
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
fussnfeathers
Mobo-fu Master
Mobo-fu Master


Joined: 04 Dec 2008
Posts: 3124
Location: Right behind you

PostPosted: Thu Oct 01, 2009 12:06 pm    Post subject: Reply with quote

I know..........I used Frontpage a long time ago, it was so awful I learned HTML the hard way. It was easier. Right now a site I work on uses ASP. Not all that fond of it, but it works well and is pretty compliant across the board. The only thing I use CSS on anymore is a single Myspace page that I'm tempted to ditch anyway, if I didn't have the professional contacts I have on it.

Not a bad thread to resurrect now, though, what with IE8 and the newest version of FF. Honestly, 3.5.2 is pretty nasty, and I've been using it since it was named Phoenix (actually, earlier, I managed to get on board when it was still called SeaMonkey).
_________________
Faster than the speed of snot

and for the million hours that we were....well I'll smile and remember them all, then I'll turn and go....
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
filecore
Black Belt 1st Degree
Black Belt 1st Degree


Joined: 29 Dec 2003
Posts: 1092
Location: Trapped inside a virtual machine.

PostPosted: Thu Oct 01, 2009 12:21 pm    Post subject: Reply with quote

I'm with you on both of those - I learned HTML by hand anyway (that's what you get for using RISC OS until 2002 and not going near anything Apple, Microsoft or *nix flavoured), but CSS isn't so bad once you get used to it.

As for Firefox, 3.x was pretty decent but I've been using 3.5.x for the past month or so, and I intensely dislike it. Seems like it's on the way downhill again... haven't tried IE8 though, as I dislike it even more (FF is so heavily customised by now that I'm loathe to change it - AdBlock Plus, NoScript, AutoPager, Tab Mix Plus, IETab, User Agent Switcher, Web Developer Toolbar, AutoPager, PhZilla, Reverse IP Lookup, FoxyProxy, Forum Fixer, and of course the Motherboards.org menu plugin - the list goes on and on!).
_________________
Home server: Asus P5Q Pro, Core2Quad, 8GB DDR2, ENGTX260 876MB, Zalman 800w, Antec P180 case, 2x1TB and 2x2TB Samsung Spinpoint F1, Windows 7 64-bit, etc

Work server: HP ProLiant ML350 G6, hexacore Xeon E5645 2.4GHz (12 logical cores), 16GB DDR3, 3x300GB SAS RAID5, Server 2008 R2, nVidia GT560Ti 1GB for Hyper-V RemoteFX acceleration
Back to top
View user's profile Send private message
evasive
Mobo-fu Master
Mobo-fu Master


Joined: 06 May 2001
Posts: 36705
Location: Netherlands, Breda

PostPosted: Thu Oct 01, 2009 2:37 pm    Post subject: Reply with quote

I see, you have a load of plugins running in FF and are surprised it's not really up to scratch? Try running a vanilla version (without plugins).
_________________
We hate rut, but we fear change.



System error, strike any user to continue...
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
fussnfeathers
Mobo-fu Master
Mobo-fu Master


Joined: 04 Dec 2008
Posts: 3124
Location: Right behind you

PostPosted: Thu Oct 01, 2009 3:13 pm    Post subject: Reply with quote

evasive wrote:
I see, you have a load of plugins running in FF and are surprised it's not really up to scratch? Try running a vanilla version (without plugins).


Might help, but I run absolutely no plugins or extensions beyond core functionality, and it's still pretty horrible. Awful memory hog...........besides, it's about time for a switch, FireFox has been relying too much on reputation, even Microsoft was bound to catch up eventually.
_________________
Faster than the speed of snot

and for the million hours that we were....well I'll smile and remember them all, then I'll turn and go....
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    The Mother Board Forum Index -> Programming All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group