0

Basically, I have to make a site fixed-width (temporarily) but unfortunately there are numerous CSS files with media queries all over the place, across all files. I've added a fixed pixel width to the body tag but the media queries are still having an effect when the browser is re-sized e.g. div elements clearing and shifting below other elements in the layout.

The only way I can think of is going through all the CSS files, commenting out all the media queries which could be a pain. Before I do this, do you know if there's a quicker way?

Thanks.

user1794295
  • 1,839
  • 4
  • 21
  • 19
  • 1
    Perhaps you could split your media queries into a separate CSS file and use an if statement to decide whether or not to load them? – Scully Mar 07 '13 at 03:20
  • Thanks, that could be very useful in the future but I'd still have to sift through all the (Bootstrap and other) files gathering all the media queries... right now I need a quick way to make browsers just ignore all media queries site-wide so that the layout doesn't adapt. – user1794295 Mar 07 '13 at 09:14
  • 1
    No quick fix for this. Reconsider building fresh upon a more suitable framework - "media queries across all over the place" sounds like a nightmare. Or continue down the work-around path.. [Cough] find and replace... – danwild Mar 07 '13 at 10:55

1 Answers1

1

Body or wrapper, set a static width and use override.

body{ width: 1280px !important; }

JerryHuang.me
  • 1,790
  • 1
  • 11
  • 21