364,083 Members | 5989 Browsing Online
Community for Developers & IT Professionals
Bytes IT Community

Why aren't these links functional in IE?

seegoon
P: 31
Hi guys.

I'm completely new to web design and development, but have been tasked with creating a passable website for a new venture. I've done the whole thing by hand, which might have been a bit foolhardy. The result is a website that looks okay on the system I'm using, but is pretty temperamental with lower resolutions and the sinful IE.

There's a page - http://buddingpress.co.uk/publish - which has some coloured banners. I've coded up a little hack that highlights them on mouseover, and they each link out to another page. Issue is that they don't work at all on IE. I understand that it was probably my own fault to create some coding without thinking about standards. How should I repair this?

Here's the on-page HTML:
Expand|Select|Wrap|Line Numbers
  1. <a href="/publish/picture-book/options.html" class="highlightit" title="blah">
  2. <div class="publish-box" id="publish-childrens">
  3. <img src="/images/white.gif" height="100%" width="100%">
  4. </div>
  5. </a>
And here's the relevant CSS:
Expand|Select|Wrap|Line Numbers
  1. .highlightit img {
  2.     filter:progid:DXImageTransform.Microsoft.Alpha(opacity=20);
  3.     opacity: 0.2;
  4. }
  5.  
  6. .highlightit:hover img {
  7.     filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);
  8.     opacity: 0;
  9. }
  10.  
  11. .publish-box {
  12.     border:2px solid gray;
  13.     width:650px;
  14.     margin:20px 0;
  15.     border:1px solid #bcbcbc;
  16.     -webkit-border-radius: 6px;
  17.     -moz-border-radius: 6px;
  18.     border-radius: 6px;
  19.     height:168px;
  20.     box-shadow: 0 5px 5px -3px #999999;
  21.     -moz-box-shadow: 0 5px 5px -3px #999999;
  22.     -webkit-box-shadow: 0px 3px 5px #999999;
  23.     overflow:hidden
  24. }
  25.  
  26. #publish-childrens { background-image:url('images/publish-childrens.jpg') }
  27.  
  28.  
As a PS, the textbox that pops up when you click the bottom link on that page is positioned really bizarrely. Do you know a fix for that, too?

Thank you muchly.
Feb 23 '10 #1
Share this Question
Share on Google+
12 Replies


zorgi
Expert 100+
P: 410
@seegoon
IE and standards !? :)

Anyhow, I checked and it works in IE8 but not in IE6 and IE7. There is nice little tool for checking things like this. Its called IE tester.

As for your problem at them moment you have this structure:
Expand|Select|Wrap|Line Numbers
  1.  <a><div><img /></div></a>
  2.  
I would try to remove DIV from between <a></a> and do all my styling on actual "a" tag to get this structure:
Expand|Select|Wrap|Line Numbers
  1. <a><img /></a> 
  2.  
or if you prefer on divs:
Expand|Select|Wrap|Line Numbers
  1.  <div><a><img /></a></div>
  2.  
Feb 23 '10 #2

seegoon
P: 31
The final solution seems to have worked perfectly, thanks for that. It seems obvious now! Would I have been able to style the <a> tags? The <div>s use background-image to get the desired effect. No matter how you look at it, I completely bodged it together so it working at all is a miracle!

Any ideas about the positioning of the pop-up? Not that you haven't already saved my ass today.

Thanks.
Feb 23 '10 #3

zorgi
Expert 100+
P: 410
I went back to your site to check that popup issue again and it seems you sorted it out :)
Feb 23 '10 #4

Dormilich
Expert Mod 5K+
P: 6,604
PS. (for future works) block elements (like <div>) are not allowed inside inline elements (like <a>)
Feb 23 '10 #5

drhowarddrfine
Expert 2.5K+
P: 4,754
I've done the whole thing by hand, which might have been a bit foolhardy
I have never coded a site any other way.
Feb 23 '10 #6

seegoon
P: 31
PS. (for future works) block elements (like <div>) are not allowed inside inline elements (like <a>)
Thanks for this. I should really spend some time learning the basics before lunging headfirst into a project and learning as I go.

I have never coded a site any other way.
Everyone I've talked to about this has said to me "oh, what software are you using?", which surprises me. Learning from scratch, I've never seen any recommendations that I should go and buy any kind of web design program at all. In fact, it looks to be looked down upon.

And Zorgi - you da man.
Feb 23 '10 #7

Dormilich
Expert Mod 5K+
P: 6,604
@seegoon
there are more programmes than just the web design programmes. nearly every code editor has it’s own pros and cons (say, tag highlighting, syntax checking, project management, ftp, distributed development, auto-completion, etc.) which may be discussed. but I agree that hand-coding is the most efficient (in terms of code).
Feb 23 '10 #8

zorgi
Expert 100+
P: 410
@Dormilich
Curios. What editor/s are you using Dormilich?
Feb 23 '10 #9

Dormilich
Expert Mod 5K+
P: 6,604
SubEthaEdit (because I can edit files on my server on the fly and on the fly PHPing) and sometimes Geany.
Feb 23 '10 #10

drhowarddrfine
Expert 2.5K+
P: 4,754
Everyone I've talked to about this has said to me "oh, what software are you using?", which surprises me. Learning from scratch, I've never seen any recommendations that I should go and buy any kind of web design program at all. In fact, it looks to be looked down upon.
The web is populated by everyday people who aren't programmers and need help creating web sites. Adobe marketing, along with others, make you believe you can't get anywhere without their software and that they'll make things easier for $600 or so. This is what makes Microsoft rich, too, but both ignore the fact that there are plenty of free tools that do the same job just as good, or better, and the human mind does a far better job than any automatic code generator that needs to guess your intentions.

Of course, you'll never learn from such things and you'll never learn how to debug problems either. It's like wanting to be a mathematician but letting a calculator do all the work. I was given a copy of Dreamweaver some years ago. I installed it to see what it was about but uninstalled it when I couldn't see the point.
Feb 23 '10 #11

drhowarddrfine
Expert 2.5K+
P: 4,754
nearly every code editor has it’s own pros and cons (say, tag highlighting, syntax checking,
Bah. Editors for sissies.
Feb 23 '10 #12

Dormilich
Expert Mod 5K+
P: 6,604
@drhowarddrfine
I know, you use Notepad ;)
Feb 23 '10 #13

Post your reply

Help answer this question



Didn't find the answer to your HTML / CSS question?

You can also browse similar questions: HTML / CSS css highlight hover internet explorer