Reputation: 35
I have a blog: Creative Blogging Tips. I am trying to make it responsive, but I find it too complicated to interact with media queries
, it really needs a lot of time.
I am looking for an easier way to make my website responsive. Is there any way to make a website responsive without using media queries
?
Upvotes: 3
Views: 5318
Reputation: 490
If not media queries then you can use frameworks like bootstrap, skeleton etc. Also flux, and other css and width and heights in %
Upvotes: 0
Reputation: 52
I completely agree, You might be surprised what you can accomplish just using percentages. But i recommend setting the viewport size:
<meta name=viewport" content="width=device-width, initial-scale=1">
Using a viewport tag and percentages is a great way to start.
Upvotes: 0
Reputation: 5405
Of course you can make your website responsive without media queries.
Not only that, but the less you use media queries, the easier your websites will be to maintain. Designing a website to use less media queries is a good design goal. It can be tricky but it's definitely worth the effort.
I strongly encourage you to look into css flex, but you can still work with floats, inline-blocks, percentages. It's not too much difficult css wise.
Upvotes: 1
Reputation: 5743
You can use Javascript onresize and onload and check for document width and change classes on the body element (or other elements) accordingly.
I think media queries are less error-prone, although you are right about the query syntax being painful and time-consuming.
Upvotes: 1
Reputation: 1076
There still are percentage widths, max-width, min-width and similar css commands.
Upvotes: 7
Reputation: 4379
I think the only way to do it, without media queries, is using Javascript.
Googling by "javascript responsive layout" I found ResponseJS which seems to dispense handling with media queries.
I also suggest you to look for some CSS frameworks like Columnal and 1140 which makes your job much easier when designing responsive layouts.
Upvotes: 2