Assistance with browser compatibility

  • Thread starter Thread starter AmiNeo
  • Start date Start date
  • Replies Replies 27
  • Views Views 4692
No, its working, I just wanted to make sense of it.

So for non-IE browsers, it needs to be between those tags but not a comment for the non-IE browsers to read it and IE to skip over it...

...and for IE browsers it needs to be inside comments to stop other browsers reading it?

That's how I now understand it. :thumbsup:

Yes :thumbsup:

---------- Post added at 12:52 ---------- Previous post was at 12:47 ----------

How would I add a transition to that to slow its appearance down? :unsure:

Use a javascript timer to slowly turn up the opacity.

Code:
function fadeMeIn(id) {
  var el = document.getElementById(id);
  el.cssText = "opacity: 0;visibility:visible;";
  var counter = 0;
  var interval = setInterval(function() {
    counter += 10;
    el.cssText = "opacity: " + (counter/100);
    if(counter == 100) {
      clearInterval(interval);
      el = null;
    }
  }, 100);
}

off the top of my head and untested, but something to that effect. Some browsers support css animations, which you can look into and some browsers (pre IE 9/10) do not support opacity, so will have to use filter :roll:

Alternatively use jQuery.
 
Hmm, Javascript is the one essential web language I haven't yet looked into so I'm very inexperienced with it.

Having said that, client side scripting is also one of the requirements so JS or JQ would be perfect. JavaScript and JQuery also seem very useful indeed, so I definitely want to learn them at some point either way.

I will take a look at your example and see if I can figure it in. Gonna have to make a trip to the shops before 6 though so may take me a while.

Thanks again :thumbsup:

Edit: should the (id) in that example be the div id ??? :unsure:
 
Edit: should the (id) in that example be the div id ??? :unsure:

Yes. the id of the element you want to fade in. So you'd call it from the "onmouseover" of the button div - like:

Code:
<div onmouseover="fadeMeIn('id of tag to display');">
 
Ah so that's how you get the function into the HTML. I think I'm going to like JS a lot :lol:

We have exams near end of January and I need to catch up on my CCNA networking and C# for them, so I'm trying to wrap as much of my web stuff up as possible over the hols. We're back on 7th, :lol:
 
I need 3 uses of server side scripting in the site for requirements. She doesnt want anything massively complex like a database or anything, and I'm planning on adding in a PHP contact form on the contacts page but I need 2 other server side scripting examples, preferably using PHP.

Anyone got any ideas of what I can get in there without including anything unnecessary? I'm struggling to come up with another 2...
The site will literally just be, info, about us, a few videos and links to download games.

I could probably make all the pages .php files and get PHP to echo out the HTML for a second one. But I wouldn't mind the input.

Thanks in advance guys! :thumbsup:

---------- Post added at 19:02 ---------- Previous post was at 18:37 ----------

PS. I'm happy to google, just enjoying the community side to this thread. I enjoy learning by conversing. :D
 
Update on this, got my head around javascript and built in a few functions. All working fine now except for IE7 mode (in IE9).

I think the problem is in CSS but can't pinpoint it. The issue is the div widths on the menus, they become 100% in IE7 but not on any other browser... It may also be the display: ; attribute I guess, but nothing I try there seems to help either...

If anyone has time to take a look and spots it before I do, I'd be grateful for a heads up :thumbsup:

site is now at www.bitzone.co.uk/cma


Also I've spoken to my tutor and he thinks I'm fine on the copyright issues, but only just based on its appearance :lol: I've sent him the code as proof that it isn't a verbatim copy.
 
Back
Top Bottom