responsive-design

default web page width - 1024px or 980px?

人盡茶涼 提交于 2019-12-20 09:34:16
问题 When developing web applications, in the past the choice has been 800px or 1024px to fit within the monitor of the user. I've been researching responsive web design and fluid designs, and it seems a lot of them define the 980px width. With the addition of smart phones and tablets, and factoring in the other possible viewports Is 980px the new de-facto standard ? Thanks. 回答1: If it isn't I could see things heading that way. I'm working on redoing the website for the company I work for and the

Recommended widths for responsive layouts [closed]

人走茶凉 提交于 2019-12-20 08:28:10
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year . What do you recommended should be the widths I should use for a responsive layout? /* Default Width: */ .container { width: 940px; margin: 0 auto; } /* Smaller than standard 960 (devices and browsers) */ @media only screen and (max-width: 959px) {} /* Tablet Portrait size to

Responsive Masonry jQuery layout example

天涯浪子 提交于 2019-12-20 08:05:11
问题 Can anyone suggest how this site uses the jQuery Masonry plugin for its responsive, fluid layout? http://tympanus.net/codrops/collective/collective-2/ Specifically; The number of columns changes from 3 to 2 to 1 on browser resize which is what you expect from a site using masonry, but what's interesting is the columns also resize to always fill the full width available. Most other Masonry sites I've seen leave gaps to the right of the columns as the number of columns changes (e.g http:/

CSS Rearranging Specific elements to be side by side, but stacked when using mobile device/width too small?

允我心安 提交于 2019-12-20 07:23:49
问题 I've been working on this nutrition calculator and am having trouble formatting the CSS to optimize data visualization. I've tried adjusting the divs and adding containers, but for some reason it just leads to overlaps I don't understand how to fix. My code: https://jsfiddle.net/q024go3v/ var stocks= [ ["Beef (80/20) raw","oz",115.4451262,3.293742347,72,4.85,5.65,0,2.142,19,20,0.0001275510204,0.375,0.75,22.15988372,0.3768292943,4 ], ["Beef (90/10) raw","oz",115.4451262,3.293742347,50,5.65,2

How to use css media queries correctly for responsive design

荒凉一梦 提交于 2019-12-20 07:12:41
问题 I have an issue with media queries. I want my main div to have a width of 960px but if the screen is smaller than 960 px - I want it to be 80% of any current width. I get only 80% from 960px and not 80% out of everything smaller (for example: 80% of 800px, 80% of 700px). HTML: <body> <div class="main"> Some big amound of text </div> </body> CSS: body{ width:100%; } .main { display: block; height: 600px; width: 960px; } @media (max-width: 960px) { .main { width:80%; } } I want it to be fluid

Customizing Twitter Bootstrap Grid Does not Work

三世轮回 提交于 2019-12-20 05:57:24
问题 I am trying to make a 24 column grid. I calculated this: Site Width: 997px Number of Columns: 24 Column Width: 31px Gutter Width: 11px Fluid Column Width: 3.1093279839519% Fluid Gutter Width: 1.1033099297894% Which should work, but when I input it into the customize form (http://twitter.github.com/bootstrap/download.html) and download span8 is 778px when it should be 248px the weird thing is that it still goes up to span24, so it IS changing... it's just getting it wrong. Please help! 回答1: It

2017 Answer to “How to make background image fixed on iPhone6”

 ̄綄美尐妖づ 提交于 2019-12-20 05:40:13
问题 I have an HTML/CSS webpage with a background image. The image is fixed on desktop and looks great, and the main text scrolls over it as intended. On iPhone6, however, it looks horrible: sometimes, two versions of the photo show up; both versions scroll with the image, rather than staying put, and the second one is stretched to the entire length of the page. I have searched high and low on stack overflow for answers, and none of the answers work: media queries don't appear to work; -webkit

Bootstrap horizontal menu collapse to sidemenu

ε祈祈猫儿з 提交于 2019-12-20 04:39:09
问题 For a website I need one horizontal menu in Bootstrap 4 (.container) after the header (.container-fluid) which should collapse into right sidebar using slideout.js. Currently I have horizontal menu (code below) but I can't figure out how to properly collapse items for slideout. How can I do it? I can't load two menus. If there is any solution I am open to suggestions. <nav class="navbar navbar-expand-md navbar-light bg-light m-0 p-0" id="menu"> <div class="container"> <div class="collapse

Bootstrap horizontal menu collapse to sidemenu

大憨熊 提交于 2019-12-20 04:39:08
问题 For a website I need one horizontal menu in Bootstrap 4 (.container) after the header (.container-fluid) which should collapse into right sidebar using slideout.js. Currently I have horizontal menu (code below) but I can't figure out how to properly collapse items for slideout. How can I do it? I can't load two menus. If there is any solution I am open to suggestions. <nav class="navbar navbar-expand-md navbar-light bg-light m-0 p-0" id="menu"> <div class="container"> <div class="collapse

HTML5 canvas responsiveness does not work

狂风中的少年 提交于 2019-12-20 04:37:29
问题 I am trying to plot a group of circles using an HTML5 canvas element (as shown in this image). The above figure gets cropped when I resize the browser. I want it to be responsive when I resize the browser. Please help me to make it responsive. Thank you. var canvas = document.getElementById("canvas"); var ctx = canvas.getContext("2d"); canvas.width = window.innerWidth; /// equal to window dimension canvas.height = window.innerHeight; var radius = canvas.height / 2; ctx.translate(radius,