arbitter Posted March 20, 2010 Share Posted March 20, 2010 So, I have pictures I must give a max-width. But as all of you know, IE is a pain there. So usually, I'd just use inline css by saying style='max-width:'50px'" or something. But I did some research, and then I had the following: img.first { max-width:390px; /* IE Image max-width */ width: expression(this.width > 390 ? 390: true); } But according to the W3Schools validator , the "width > 390 ? 390: true);" isn't correct as the numbers are incorrect. I tried with 390px but that doesn't do it eather. Could someone help please? Link to comment https://forums.phpfreaks.com/topic/195931-problem-expression-max-width/ Share on other sites More sharing options...
haku Posted March 21, 2010 Share Posted March 21, 2010 Your declaration is fine. I believe your problem comes from the fact that the declaration is IE proprietary, and therefore not valid according to W3C. But if you want your max-width to work in IE6, you will have to include that. Link to comment https://forums.phpfreaks.com/topic/195931-problem-expression-max-width/#findComment-1029353 Share on other sites More sharing options...
arbitter Posted March 21, 2010 Author Share Posted March 21, 2010 Then I'll just ignore it. Thanks a lot! Link to comment https://forums.phpfreaks.com/topic/195931-problem-expression-max-width/#findComment-1029450 Share on other sites More sharing options...
trq Posted March 21, 2010 Share Posted March 21, 2010 Then I'll just ignore it. Thanks a lot! [ot]On a side note. The validator you keep referring too as being 'w3schools' is actually the w3c's validator. The w3c has nothing at all to do with w3schools. [/ot] Link to comment https://forums.phpfreaks.com/topic/195931-problem-expression-max-width/#findComment-1029466 Share on other sites More sharing options...
arbitter Posted March 21, 2010 Author Share Posted March 21, 2010 Then I'll just ignore it. Thanks a lot! [ot]On a side note. The validator you keep referring too as being 'w3schools' is actually the w3c's validator. The w3c has nothing at all to do with w3schools. [/ot] Yes I know, but it only soaked into my brains after saying those things. My bad Link to comment https://forums.phpfreaks.com/topic/195931-problem-expression-max-width/#findComment-1029487 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.