AndyB Posted October 12, 2006 Share Posted October 12, 2006 The thread title says what I wish I could do with both IE and Firefox (and I don't even care about the other browsers).Full example viewable source at http://www.halfadot.com/temp/pick-colors.htmlBasically I want to show selectable foreground/background colours in a specific div. The syntax below sort of works with IE except it declines to show the font size as defined, there are no colour changes with Firefox but the text is shown the right size. The code is pretty trivial ... except it doesn't work. Any javascript/CSS wizards want to point me in the right direction?[code]select onChange='document.getElementById("testx").style.color = this.value;'[/code] Quote Link to comment Share on other sites More sharing options...
fenway Posted October 12, 2006 Share Posted October 12, 2006 Well, the FF problem is simple enough -- your values aren't valid HTML colours, since the lack the leading '#'. IE will let you get away with just about anything ;-) Not sure about the font-size issue, I don't see what you're talking about. Quote Link to comment Share on other sites More sharing options...
AndyB Posted October 12, 2006 Author Share Posted October 12, 2006 Thanks.Unsurprisingly adding # to the colour definitions solved the problem with FF ... puts on dunce cap :oIE (still) refuses to pick up the inline font size in the div definition. I wonder why? Quote Link to comment Share on other sites More sharing options...
akitchin Posted October 12, 2006 Share Posted October 12, 2006 i don't see what you mean - they both appear at the same size in my IE and FF. do you mean the positioning? i notice FF's text is centered both vertically and horizontally, whereas IE is only horizontally centered. Quote Link to comment Share on other sites More sharing options...
AndyB Posted October 12, 2006 Author Share Posted October 12, 2006 Well, that's weird. When I view with FF the font looks about right for the declared size of 32px. Seen with IE6, the font size looks about 12px high. Quote Link to comment Share on other sites More sharing options...
akitchin Posted October 12, 2006 Share Posted October 12, 2006 weird indeed. looks to me to be about 32px in IE6win. Quote Link to comment Share on other sites More sharing options...
AndyB Posted October 12, 2006 Author Share Posted October 12, 2006 [quote]weird indeed. looks to me to be about 32px in IE6win.[/quote]That's good enough for me. I'll plonk it on the client's site and if she says nothing I'll assume either she doesn't notice or that it works for her as well. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.