0

Real quick question here... I'm trying to style a public facing website. I've coded individual css files for the different browsers, but I've noticed that I've got some display issues when a user views the page from a mac OS... it's minor- just a footer background that's about 50 px too high, but it happens identically on FF and Chrome... both interpret correctly when viewed from Windows, but the same browsers from a Mac mess it up... this was one of the issues that initially got me to do differently tweaked...

Here's what I'm using for browser detection...

    Dim browser As HttpBrowserCapabilities = Request.Browser
    Dim bName As String = browser.Browser
    If bName = "IE" Then...

Ok, So I'm thinking that the browser reports differently under these different circumstances, but there's only one mac in the company, and I'm having trouble finding a way to get what she sees to report to me, short of posting some kind of label... Does anyone know if there's a difference, and if so, what it is? what string I could look for so that I don't have to just throw mac users into an "else" category?

UPDATE Well, I coded a little JS to give a popup for what the browser was reporting as... both FF and chrome reported correctly... so it seems that those OS's seem to interpret the CSS slightly differently, just like different browsers do? Does anyone know a trick for determining the OS a browser is coming from?

Jon
  • 301
  • 1
  • 5
  • 19
  • figure out what's wrong in the css to cause this extra 50px. and note that detecting browser is very unreliable. it's trivial to forge the browser's ID string and masquerade as any other browse you want. – Marc B May 08 '14 at 15:27
  • I'm aware of the unreliability... I've done a fair amount of research, and the camps seem fairly split (50/50) on whether you should try and detect browsers vs feature detection... and from a long term maintenance perspective, it seemed easier to code things this way, and if a new browser arrives, or an new version arrives that reports differently, that'll be more apparent and more easily coded for rather than risking a possible update which may suddenly change displays for newer versions of existing browsers. – Jon May 08 '14 at 15:42
  • I wonder if it could be running in to this issue http://stackoverflow.com/a/7088680/1191903? – Kevin Main May 08 '14 at 15:51

0 Answers0