media-queries

disable prettyphoto on small screens (or any a href link)

荒凉一梦 提交于 2019-12-24 23:17:10
问题 I was looking for a way to disable prettyphoto lightbox on mibile devices or any other small screens and after spending hours by trying different script, I discovered a very simple way to do that with css media queries: html <div> <a class="lightbox" rel="prettyPhoto" href="img.jpg"> <img src="img.jpg"> </a> </div> css @media all and (max-width: 479px) { a.lightbox { pointer-events: none; } } But, I just like to know if there is a better (proper?) way? Is it better to use a JS functions ( ($

Using viewport for responsiveness instead of media queries

十年热恋 提交于 2019-12-24 19:01:46
问题 My wordpress theme and the plugins I have installed conflict with one another forcing me to do my own CSS coding. After toying around with CSS and the inspect element tool on chrome, I fixed the responsiveness (not really fixed, more like hacked I guess..) of my website thevandreasproject.com. I used this code to make it work on the iPhone 5 screen: @media (min-width: 680px) { .home-background .textwidget { font-size: 50px; font-style: normal; font-weight: 500; letter-spacing: 8px; font

Responsive Site Not Working on iPad

╄→尐↘猪︶ㄣ 提交于 2019-12-24 14:16:35
问题 I'm in the process of creating my own framework and have been looking at other boilerplates to see how it is done. I'm currently looking at this bare bones stylesheet and was wondering why it seems to act responsive when you resize the browser, but when I open it on my iPhone or iPad it displays the full screen version of the site. Sorry if this is noob question, I'm still trying to wrap my head around media queries (no pun intended). Thanks in advance. UPDATE: Silly me, I forgot to add the

How to work responsive email

柔情痞子 提交于 2019-12-24 13:56:05
问题 I did a post about this yesterday. With the help of one answer, I learned the good structure for an email newsletter. I applied those on my email newsletter. I also added media query code. I know, media query is not supported in all email clients. But, Who support, I want some change with layout for them. Unfortunately, media queries haven't worked in my email newsletter, I can't understand what's the reason. This is the visual of desktop version email. This is the visual of mobile version

Using JS media queries to change ScrollMagic triggerHook position

笑着哭i 提交于 2019-12-24 13:32:50
问题 How can I successfully reload my scroll magic code and change the triggerHook position? When I try to do it with the code below it sets the trigerHook twice so there are two of them on the screen. My ScrollMagic code goes like this: //Scrollmagic & gsap to move buildings// var controller = new ScrollMagic.Controller(); // build scene first building new ScrollMagic.Scene({ triggerHook: myTriggerHook, triggerElement: "#sec1", duration: $("#sec1").height() + 0 }) .on("enter leave", function() {

Google Chrome, float, and media queries

故事扮演 提交于 2019-12-24 12:35:02
问题 I'm having a problem where Google Chrome sometimes incorrectly renders a floated element. More specifically, the markup looks like this: <h1> Headline <small>Sub-heading</small> </h1> This is styled using this simple CSS: h1 small { display: block; } @media (min-width: 750px) { h1 small { float: right; } } (here is a link to a jsfiddle.com which demonstrates the problem in action: http://jsfiddle.net/ys6L88r8/1/) As you can see, the element is floated within a media query. When loading the

Using Javascript to dynamically add styles to stylesheet but I get a “Cannot read property 'length' of undefined” error

余生颓废 提交于 2019-12-24 12:10:03
问题 I am currently trying to make my own polyfill that will allow older browsers such as Internet Explorer the ability to read and execute media queries using traditional css selectors. The process flow goes something like this: Iterate through each stylesheet found within document Run through each style rule in stylesheet searching for media queries Define what device size we are targeting then apply appropriate "id" Dynamically add css line with selector to existing stylesheet The idea is that

CSS orientation media query

和自甴很熟 提交于 2019-12-24 11:36:35
问题 Can some one explain to me what the orientation media feature does in layman's terms? 回答1: It's mainly for mobile devices like a phone. You can control the style based on whether the device is being held upright, or sideways ... @media all and (orientation:portrait) { /* Your CSS here */ } @media all and (orientation:landscape) { /* Your CSS here */ } 回答2: Assuming you are asking about the media attribute in the link tag please find the answer below. Media is to tell the browser or the device

Media query lost in Firefox when window resized to max-width minus scrollbar width

浪子不回头ぞ 提交于 2019-12-24 11:18:04
问题 This is my first attempt at a responsive site design and have run into a weird issue where media queries are lost at particular window widths in Firefox 32 for Windows 7 (so far anyway). When slowly resizing the window it can result in a flash of (mostly) unstyled content at breakpoints. If I carefully resize the window I can hit widths that are between breakpoints. I end up seeing the default styles as the media queries are lost in both cases. For instance, max-width 768px is one breakpoint

How to hide the horizontal scroll bar while scrolling in mobile

我们两清 提交于 2019-12-24 10:49:26
问题 I have some lists that I am displaying in one line on desktop but on mobile, I have to display the same but it should be horizontally scrollable by swiping. I tried the below code using CSS. It's working but I don't want to show the horizontal scroll bar while scrolling. Also, I am using bootstrap 4 so I added my list inside the container. Would you help me out in this? .aboutlinks ul { margin: 0; padding: 0; list-style: none; } .aboutlinks ul li { display: inline-block; margin: 15px; border: