2

Is there a reliable way to tell whether a web page's layout is fixed or fluid? I don't care if it required a library like jQuery or MooTools so long as it's reasonably accurate.

Tyler Brinks
  • 1,201
  • 1
  • 14
  • 24

1 Answers1

0

Typical width methods are going to give you pixels, but there's an answer here which should give you (in most cases) a percentage width if it is defined as such: get CSS rule's percentage value in jQuery

Suspected caveats with this method:

  • The width is declared in the first stylesheet (this could be modified as appropriate to search all stylesheets).
  • The width isn't an inline style.
  • You know the major container element of the page (this would be an issue with any method).
Community
  • 1
  • 1
Matt Mitchell
  • 40,943
  • 35
  • 118
  • 185