responsive-design

Change layout based on screen size

只愿长相守 提交于 2020-01-30 11:52:25
问题 I would like the content of my website header to occupy 100% of the screen width on regular-sized desktops/laptops, but to be centered on larger displays. By "larger displays", I'm referring to the actual size of the display too, not just the resolution. On my 15" laptop and my 23" desktop (both having the same resolution of 1920x1080), I would like the displays to be different. Having such a wide menu on a 23" display doesn't look good as there are wide empty parts. I'm currently using a

How to get <img> to be the same width as <figcaption>?

删除回忆录丶 提交于 2020-01-30 08:14:29
问题 In a responsive design, how can the width of a <figcaption> be made to adjust according to the width of the <img> , but not exceed it? <section> <figure> <img src="link.jpg"> <figcaption>Caption</figcaption> </figure> </section> The corresponding CSS only limits the <img> and not the <figcaption> , see: How can the <figcaption> be constrained along with the <img> , without using max-width: 200px (or 12.5em) on the <figure> container? Here are the important bits of CSS (full on JSFiddle):

How to get <img> to be the same width as <figcaption>?

前提是你 提交于 2020-01-30 08:13:05
问题 In a responsive design, how can the width of a <figcaption> be made to adjust according to the width of the <img> , but not exceed it? <section> <figure> <img src="link.jpg"> <figcaption>Caption</figcaption> </figure> </section> The corresponding CSS only limits the <img> and not the <figcaption> , see: How can the <figcaption> be constrained along with the <img> , without using max-width: 200px (or 12.5em) on the <figure> container? Here are the important bits of CSS (full on JSFiddle):

Dynamically Resize Text Based on Container Width

◇◆丶佛笑我妖孽 提交于 2020-01-29 05:42:05
问题 I'm working on a responsive design and I have some display <h3> tags that I would like to scale down when the width of the browser window is reduced. The initial setup, based on a width of 960px: The body font-size is set to 14px The font-size of the h3 tag is 40px The width of the containing div is 230px So here's what I worked out for the javascript/jQuery: $(window).resize(function(){ var containerSize = $('.container').width(); var textPercentage = 0.17391304347826086956521739130435; /*

Responsive layout for mobile tablet

跟風遠走 提交于 2020-01-25 22:04:19
问题 I created an ecommerce page and added @media to make the page responsive. but its not working fine can you please take a look where I am doing mistake more over if my coding style is wrong then please correct . More over my images are not also responsive too.. Here is the code @media(min-width:1200px){ *{margin:0; padding:0;} #header{ width:100%; height:54px; background-color:#090; position:fixed; z-index:2; } #wrapper{ width:80%; background-color:#F7F4F4; margin:auto; } #category1{ width:100

Responsive layout for mobile tablet

故事扮演 提交于 2020-01-25 22:03:34
问题 I created an ecommerce page and added @media to make the page responsive. but its not working fine can you please take a look where I am doing mistake more over if my coding style is wrong then please correct . More over my images are not also responsive too.. Here is the code @media(min-width:1200px){ *{margin:0; padding:0;} #header{ width:100%; height:54px; background-color:#090; position:fixed; z-index:2; } #wrapper{ width:80%; background-color:#F7F4F4; margin:auto; } #category1{ width:100

Full Width and Height Responsive Embedded YouTube Video

牧云@^-^@ 提交于 2020-01-25 21:05:13
问题 I'm working on a project and if you scroll down to the "What is RoadAware" section you can see a YouTube video embed that looks awful! I need the video to fill the "about-left" div 100% to match the "about-right" div. I've been struggling to find an answer, any help is really appreciated! http://road-aware.herokuapp.com/ 回答1: Add embed-responsive embed-responsive-4by3 to your video-wrapper class This is from bootstrap <!-- 16:9 aspect ratio --> <div class="embed-responsive embed-responsive

media query is not working on ie10

你说的曾经没有我的故事 提交于 2020-01-25 11:52:17
问题 i made a responsive site and i'm using media queries in my css. everything is looking good on chrome and FF but ie10 is ignoring all my queries. i have <meta name="viewport" content="width=device-width,user-scalable=no, initial-scale=1"> on the header because the site is set for tablets. i tried to delete the meta tag and it didn't solve the problem. i tried almost everything: @media only screen and (max-width: 800px), only screen and (max-device-width: 800px) @media only screen and (max

media query is not working on ie10

妖精的绣舞 提交于 2020-01-25 11:52:05
问题 i made a responsive site and i'm using media queries in my css. everything is looking good on chrome and FF but ie10 is ignoring all my queries. i have <meta name="viewport" content="width=device-width,user-scalable=no, initial-scale=1"> on the header because the site is set for tablets. i tried to delete the meta tag and it didn't solve the problem. i tried almost everything: @media only screen and (max-width: 800px), only screen and (max-device-width: 800px) @media only screen and (max

Browser Window Responsive to Content

倾然丶 夕夏残阳落幕 提交于 2020-01-25 10:13:12
问题 I cannot really find any questions or information related to this elsewhere, so I thought I would post a question. Is there a way to make the BrowserWindow responsive to the content of index.html ? I know you can likely do this by manually changing the size of the BrowserWindow either with resizeTo or remote , but you would need to know the explicit size to set it to. Is there a way to simply make the window responsive to the content, so that as the document's body grows, so too does the