I'm using MDL for a desktop-only web application and I do not need the content to be responsive. That is, even if the user resizes the browser window, I don't need to re-arrange the content. Neither it will ever be browsed on a mobile device. How do I prevent the content from being responsive?
Asked
Active
Viewed 645 times
0
-
Add a fixed width to your main element e.g. body or form – hr_117 May 04 '16 at 13:08
-
Adding a fixed width to the body element didn't solve the problem.. – toomuchkevin May 09 '16 at 08:17
-
That depends of you content. If there are children with position="absolute" you may set the width for those. E.g with only `div.mdl-gird` in body setting width on body should do. If you use `mdl-layout` There will be an `div.mdl-layout__container` with `position: absolute`. Then you need to set the with for this. But any way your question if far to open. You need to add your current code etc. – hr_117 May 09 '16 at 08:48
1 Answers
0
https://getmdl.io/components/index.html#layout-section/grid
I have provided reference to the MDL grid at the above link.
The content should not be responsive without initiating something like the mdl-grid class and mdl-cell class which would then allow you to label pieces like a content card with specific sizing, which will resize based on the device. If you are using your own style sheets you could create a card class which would have a specific pixel width you believe would work best for the project on a desktop.

user2207532
- 46
- 2