alienA2 19 Posted December 9, 2011 Report Share Posted December 9, 2011 My webpage seems to look how I wanted it to look on Mozilla FireFox, and Chrome. Last night I just viewed my webpage on Internet Explorer and it looks very different. Examples were my image was not centred and now it was left aligned... Is Internet Explorer crap? !??? I mean I can't just leave out the Internet Explorer fans because there are people who view websites on that browser too... Any advice? Quote Link to post Share on other sites
Synook 47 Posted December 9, 2011 Report Share Posted December 9, 2011 Validate your page, and use CSS. Otherwise, we'd probably need to see your code. Quote Link to post Share on other sites
JannikL 0 Posted December 9, 2011 Report Share Posted December 9, 2011 I had this problem a few days ago aswell - which pictures are not alligned in the center?If you just want to make the image centered, there is a way that I use, which works, however I don't know if that is the easiest way.All I did was simply placing the IMG in a div, and align that div to the center. <div align="center"><img src="image here"></div> Let me know if it worked Quote Link to post Share on other sites
alienA2 19 Posted December 9, 2011 Author Report Share Posted December 9, 2011 (edited) Validate your page, and use CSS. Otherwise, we'd probably need to see your code. I did do some adjustments to my external CSS file. But strangely it does not pick up those changes in IE. However when I add the adjustments in the html file inside the tags like <img> and insert my style specification such as style="margin-left:15px" to look something like this <img src=your_source style="margin-left:15px" />, Internet explorer picked up the changes as appose to updating the external CSS file... Does IE not like styles to be done inside an external CSS file? Whats your email add, il send the file to you. Edited December 9, 2011 by alienA2 Quote Link to post Share on other sites
thescientist 231 Posted December 9, 2011 Report Share Posted December 9, 2011 it might be worth clearing your cache. IE definitely does recognize styles in an external style sheet. Quote Link to post Share on other sites
alienA2 19 Posted December 10, 2011 Author Report Share Posted December 10, 2011 (edited) ok guys... Found out the issue... I used an ID instead of Class in the IMG tag. When I tweaked the ID created in CSS, it picked up the changes... Before:html<img class=your_class src=your_source />css.your_class{margin-left:15px;} After:html<img id=your_id src=your_source />css#your_id{margin-left:15px;} Am I right or wrong to say that IMG tags prefer ID rather than Class for Internet Explorer? Edited December 10, 2011 by alienA2 Quote Link to post Share on other sites
Ingolme 1,019 Posted December 10, 2011 Report Share Posted December 10, 2011 It's wrong. That is just chance that it happened to work. The CSS specification has several rules to define the priority of conflicting rules. The highest priority is given the the selector that has an ID, but this only matters if you had conflicting rules, and it should give you the same problem in all browsers. What I think really happened is that Internet Explorer stopped loading the stylesheet from the cache. Quote Link to post Share on other sites
thescientist 231 Posted December 10, 2011 Report Share Posted December 10, 2011 you should also be quoting your attribute values too. Quote Link to post Share on other sites
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.