Solved

Strange css padding in IIS6

Posted on 2011-02-23
11
993 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
ID: 34967909
Did u clear all css objects paddings or margins ?
0
 
LVL 38

Expert Comment

by:Rich Rumble
ID: 34969119
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
ID: 34992528
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 2

Author Closing Comment

by:simprick
ID: 35034612
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
ID: 35168237
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
 
LVL 38

Expert Comment

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

Author Comment

by:simprick
ID: 35168747
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
ID: 35728776
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
ID: 35729094
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
ID: 35729610
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
ID: 35729664
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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

813 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

18 Experts available now in Live!

Get 1:1 Help Now