responsive

side bar with a no previsible width in CSS/HTML

我只是一个虾纸丫 提交于 2019-12-24 00:45:37
问题 Is there a way to achieve the following behavior in css/html : Please note the green side bar has not to be responsive but I cannot give it a fixed width with width: XX px; because it can contain more or less elements, so no idea of XX in advance. The brown bar has to be responsive and takes all the remaining width. Thanks in advance for any trick! I have tried tables but with no success as we can't specify a div to restrict its with to what is necessary. 回答1: You can achieve that easily with

How to detect if screen size has changed to mobile in React?

寵の児 提交于 2019-12-20 09:15:32
问题 I am developing a web app with React and need to detect when the screen size has entered the mobile break-point in order to change the state. Specifically I need my sidenav to be collapsed when the user enters mobile mode and that is controlled with a boolean stored in the state within the component. 回答1: What I did is adding an event listener after component mount: componentDidMount() { window.addEventListener("resize", this.resize.bind(this)); this.resize(); } resize() { this.setState(

responsive website using descendant selectors

爷,独闯天下 提交于 2019-12-20 07:19:22
问题 im trying to make my website responsive using media queries, however the page is not responding when i used the descendant selector in certain parts of me code. The page is responsive when i use this code: .div1{ float: left; width:20%; height: 200px; background-color:red; border: 1px solid #f2f2f2; margin-left: 2%; border-radius: 50%; } .div2{ float: left; width:20%; height: 200px; background-color:yellow; border: 1px solid #f2f2f2; margin-left: 2%; border-radius: 50%; } .div3{ float: left;

Why are some of the grid lines randomly disappearing on my responsive D3 chart?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-19 09:02:27
问题 I have created a stripped down JSFiddle of my D3 chart. I have made it responsive (with viewbox and preserveaspectratio) using the solution at: responsive D3 chart When I resize the window and make it smaller, some of the grid lines seem to be disappearing and reappearing. I presume this will look bad at small resolutions (eg. 320x480 mobile phone). Is there a way to preserve my gridlines when the window gets resized smaller? HTML code: <!--//d3 chart//--> <div class="centre-div"></div> CSS

How to detect ONLY with CSS mobile screens

邮差的信 提交于 2019-12-18 05:06:12
问题 I've found a lot of threads here talking about CSS and mobile screens. After my searching, i couldn't find solution for some devices. For example: Motorola Moto G4 Plus uses FULL HD width(1080px), only bootstraps detect the xs-view configuration. Styling and trying and trying i couldn't get some styles setted up. So, how can i make the same procedure as Bootstrap to set up my styles and in general procedure for all devices? Please, only CSS or as much JS(if it possible, don't), the same as

The values of meta viewport attribute are not reflected when in full screen mode in android chrome browser

我们两清 提交于 2019-12-17 19:30:43
问题 When I am in full screen mode in android using fullscreen api, the values of meta viewport attribute like initial-scale and user-scalable are not reflected in the browser. If I am not in full screen mode, the values of meta viewport are reflected. You can check it by accessing MDN:Fullscreen api example from a mobile browser I don’t find any source saying meta viewport will be disabled in fullscreen in android. So am I making any mistake or no one has documented it? Also pinch and zoom is

Bootstrap 4 collapse navbar with Angular 4

北慕城南 提交于 2019-12-17 19:29:13
问题 I want to make a navbar using Bootstrap 4 and Angular 2 that collapses his content on a button when the width of the browser reaches some value. I achieve this, and when the navbar collapses I can see the button that encloses the elements in the navbar, but this button doesn't work. How can I fix this without using jquery? I was trying to use ng-bootstrap. In the image you can see the button when the navbar collapses. My code so far: <nav class="navbar navbar-expand-md fixed-top navbar-dark

sticky bootstrap footer overlaping content of page in responsive

邮差的信 提交于 2019-12-13 17:19:21
问题 ..... <div class="container"> ...... </div> </div> <!-- End -Wrap --> <div id="footer"> <div class="container"> .... </div> html { position: relative; min-height: 100%; } body { position: relative; } #footer { position: absolute; bottom: 0; width: 100%; } [![IN responsive (overlapping)][1]][1] [![in web page][2]][2] [1]: https://i.stack.imgur.com/itr4Y.png [2]: https://i.stac k.imgur.com/8OXpa.png I have add screenshots.It is working in web pages but overlapping is responsive.Is it important

Angular 2 Responsive Header - Expand/toggle button not working in mobile view

左心房为你撑大大i 提交于 2019-12-13 00:15:49
问题 The toggle button appears in mobile view but it's not clickable. In angular appDropdown is used to define a drop down button. Is there a similar approach to fix the toggle button? Unfortunately I cannot show images here but there's another problem with "Administration" drop down button. It changes colour to grey when I hover over the internal <li> (such as "Registration"...). Adding href= "#" removes the unwanted color change but this refreshes the whole page when its clicked. Here's the HTML

Bootstrap glyphicons are missing

蓝咒 提交于 2019-12-12 19:28:33
问题 I don't know why, but my glyphicons from Bootstrap (3.3.7) are missing, they are being substituted by a normal and ugly square. Here is an example of code that calls a missing glyphicon: <button type="button" class="btn btn-default"> <span class="glyphicon glyphicon-star" aria-hidden="true"></span> Star </button> And here it is the Bootstrap part that contains glyphicon's font: @font-face { font-family: 'Glyphicons Halflings'; src: url('../fonts/glyphicons-halflings-regular.eot'); src: url('.