responsive-design

How to Make Navigation Buttons Mobile-Responsive and Collapse in Order?

我的梦境 提交于 2019-12-20 03:57:12
问题 I have been trying for hours with different methods to get my navigation buttons to be mobile-responsive and collapse in a specified vertical order . I want the nav buttons to collapse in a vertical column below the two logos , once the screen size is shrunken (to around 500px). How do I fix my code to achieve this? .container-fluid { border: 1px solid #000000; max-width: 1600px; overflow: hidden; } .wrap { /*background-color: yellow;*/ /*overflow: hidden;*/ } .Logos { width: 312px; display:

srcset and viewport width

别等时光非礼了梦想. 提交于 2019-12-20 03:52:11
问题 I have 2 images: one desktop version, one mobile version. I would like the desktop image to be replaced by the mobile image when the viewport width resizes below 480px, just as would with the following CSS with background-image property : .logo { background-image: url(http://placehold.it/400x200&text=desktop); } media screen and (max-width: 480px) { .logo { background-image: url(http://placehold.it/300x150&text=mobile); } } I thought I could achieve this with the srcset HTML attribute : <img

Fullscreen not working in IE

对着背影说爱祢 提交于 2019-12-20 03:35:08
问题 So I have my slider module up and running but Internet Explorer 11 is not responding to the fullscreen button. Firefox and Chrome are working just fine. I found this code on Stack but still no difference. Any thoughts? function toggleFullScreen() { if (!document.fullscreenElement && // alternative standard method !document.mozFullScreenElement && !document.webkitFullscreenElement) { // current working methods if (document.documentElement.requestFullscreen) { document.documentElement

Responsive design css dom element manipulation

你离开我真会死。 提交于 2019-12-20 02:55:01
问题 I have div field including a input element and a label element. Both are display: block <div class="cf-full"> <input id="a" > <label class="helptext"</label> </div> So in normal view, the input field will come first. However, i want the layout to be responsive, so that in mobile the label will come first. I know this DOM manipulation can be achieved by javascript easily. But is there a way to achieve the reverse DOM elements order by pure css? 回答1: This works div { display:table; } input {

Responsive DIV scaling within “background-size: contain” image

岁酱吖の 提交于 2019-12-20 02:31:34
问题 UPDATED 01/01/15 Problem: I have a centered background image that is scaling with background-size: contain . I would like to have DIVs (for links, etc.) that overlay on the background and also scale with said background whenever the browser is resized, but also stay positioned relative to that background's size. In the Fiddle provided below, the red border shows where the navbar should exist and the green border shows where the 'Home' button should be. Resize your browser window as far as you

Responsive DIV scaling within “background-size: contain” image

╄→гoц情女王★ 提交于 2019-12-20 02:30:07
问题 UPDATED 01/01/15 Problem: I have a centered background image that is scaling with background-size: contain . I would like to have DIVs (for links, etc.) that overlay on the background and also scale with said background whenever the browser is resized, but also stay positioned relative to that background's size. In the Fiddle provided below, the red border shows where the navbar should exist and the green border shows where the 'Home' button should be. Resize your browser window as far as you

CSS responsive float left and right (change which div goes on top)?

浪子不回头ぞ 提交于 2019-12-19 19:57:57
问题 I'm working on this page: http://www.insidemarketblog.com/test-4/ You'll see that the word "test" is in the div floated left, and the image is in the div floated right. If you resize it, you'll see the div floated left goes on top, and the div floated right goes below. How can you invert that order? So that the div floated left goes BELOW the div floated right. Nothing I do seems to work. HTML: <div class="main_header"> <div class="banner_left"> <p>test</p> </div> <div class="banner_right">

Can I use <picture> for both height and width-constrained images?

↘锁芯ラ 提交于 2019-12-19 19:48:50
问题 I have a slideshow sort of thing where images will expand as large as they can, but not exceed the viewport's width or height. Basically object-fit: contain . I'd like to make these images responsive, since "as large as they can" for a phone and a great big desktop is quite the difference. I can't use <img srcset> because right now, it only does screen density ( x descriptors) or width ( w descriptors). So that leaves <picture> to manually make the selection logic myself. I started with:

How can I reduce font size based on length?

人走茶凉 提交于 2019-12-19 18:24:46
问题 Currently I have some large text on a page, and layout works fine for short text (~12-14 chars in length), but any more than that will overflow or wrap. This is undesirable, so I'd like the size to be reduced to fit the whole text. I've looked into JS solutions like FitText and BigText, but they depend on a fixed width. Since I'm using Bootstrap, I don't have fixed widths. Okay: http://tf2reputation.com/profile.php?id=76561197960947673 Not okay: http://tf2reputation.com/profile.php?id

How to make centre cropped image responsive?

两盒软妹~` 提交于 2019-12-19 14:42:35
问题 Based on an existing answer, I have managed to centre crop an image. I am having trouble making the centre cropped image responsive, though. Question When I reduce the size of the web browser window, the centre cropped image does not scale down nicely. Instead, it maintains it's fixed height and width and spills out of the view-port. The problem is perhaps demonstrated more clearly with a Fiddle. How can I make the centre cropped image scale down nicely? Ideally the centre cropped image will