Solved

Strange css padding in IIS6

Posted on 2011-02-23
11
982 Views
Last Modified: 2012-05-11
I developed a site using Visual Studio 2010.  I used IIS 7 as a test server for the development of the site.  Everything seemed fine up until I began testing the site on IIS 6 and began to see some sort of padding issue.  It is apparent in the sub navigation I built that are simple css styled lists.  But they render differently on when the site is served from IIS 6 and IIS 7.  Anyone have any ideas on this?  iis6 iis7
0
Comment
Question by:simprick
  • 4
  • 3
  • 3
  • +1
11 Comments
 
LVL 19

Expert Comment

by:Melih SARICA
Comment Utility
Did u clear all css objects paddings or margins ?
0
 
LVL 38

Expert Comment

by:Rich Rumble
Comment Utility
I doubt the server is making this happen, perhaps a space, or an unclosed tag... Get firefox, then get Firbug, inspect that element and see if the CSS/Style's are different. If it's Internet Explorer 6 and IE7 then for sure there can be an issue, but I doubt it because IIS 6 vs IIS7.
-rich
0
 
LVL 2

Accepted Solution

by:
simprick earned 0 total points
Comment Utility
I don't understand why it the spacing would be so different.  I agree it seems strange to blame this on the server, but with the same IE client the 2 are different, firefox they both seem the same.  I ended up just changing the css to look better on IIS 6.
0
 
LVL 2

Author Closing Comment

by:simprick
Comment Utility
No resolution as to why the 2 servers seem to produce different results.  I used  IE Developer Tools and FireBug for FireFox and could not dertermine that anything was different on the client side.
0
 
LVL 2

Author Comment

by:simprick
Comment Utility
For anyone having the same issue, this was killing me I started to notice it in more and more places.

Solution is:  IE 8 automatically turns on compatibility mode for sites considered in an intranet (inside your network).  So compatibility mode was being turn on for my development site, when I was testing using iis 7 and other servers using iis 6, they were not considered being on the intranet and so IE was not displaying them in compatibility mode, and rendering differently.  Whooo. wtf, pima.  At least I know now.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 38

Expert Comment

by:Rich Rumble
Comment Utility
I thought you used FF and it acted the same way there too?
-rich
0
 
LVL 2

Author Comment

by:simprick
Comment Utility
From above: but with the same IE client the 2 are different, firefox they both seem the same.

I meant they look different in the same IE client, ff looked the same as one of the IE seesions, but not the other.
0
 

Expert Comment

by:gtseamus
Comment Utility
Sim, what css changes did you end up employing? I have the same problem but with IIS6 vs. Apache -- and IE8 as the client. I even went as far as trying to hardcode style="padding 2;" on each submit button, but to no avail. buttons served from IIS6 buttons served from apache 2.2
0
 
LVL 38

Expert Comment

by:Rich Rumble
Comment Utility
His issue was solved using IE's compatibility mode: 35168237
      
Solution is:  IE 8 automatically turns on compatibility mode for sites considered in an intranet (inside your network).  So compatibility mode was being turn on for my development site, when I was testing using iis 7 and other servers using iis 6, they were not considered being on the intranet and so IE was not displaying them in compatibility mode, and rendering differently.
-rich
0
 

Expert Comment

by:gtseamus
Comment Utility
To get the button padding around the button title itself to look the same in both IIS6 and Apache, I had to add: .submit_button_fix {padding: 1px; overflow: visible;} to my css. I still have issues around the forms.. extra padding there as well but wasn't able to get rid of all of it. These forms are in a table, and I ended up giving up, starting a new table row for the third form.
0
 

Expert Comment

by:gtseamus
Comment Utility
Rich.. you're right about compatibility mode.. I was seeing production in that mode, after removing it's much closer to my local version running on apache. Still have some tweaking, but thanks for the tip.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
Learn about cloud computing and its benefits for small business owners.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now