Jump to content
Sign in to follow this  
alienA2

My Webpage Looks Very Different When Viewing It In Internet Explorer.

Recommended Posts

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?

Share this post


Link to post
Share on other sites

Validate your page, and use CSS. Otherwise, we'd probably need to see your code.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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 by alienA2

Share this post


Link to post
Share on other sites

it might be worth clearing your cache. IE definitely does recognize styles in an external style sheet.

Share this post


Link to post
Share on other sites

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 by alienA2

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

you should also be quoting your attribute values too.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...