responsive-design

Horizontal list element evenly spaced and responsive

家住魔仙堡 提交于 2019-12-12 12:25:52
问题 I am creating an unordered list that contains images and text, and would like each item to be 1/3rd the width with a margin, evenly spaced. I can't figure out how to ensure, in a responsive website, the items are always exactly 1/3rd the width, including margins. Percentages seem to not remain consistent across browsers. HTML <ul> <li><img>Text</li> <li><img>Text</li> <li><img>Text</li> <li><img>Text</li> <li><img>Text</li> <li><img>Text</li> </ul> CSS ul {list-style:none; text-align:center;

How to split an image responsive into two div blocks using css?

孤者浪人 提交于 2019-12-12 12:21:26
问题 I have an image which is responsive : <img class="img-responsive" src="img/image.jpg"/> I want to split it into two divs : <div class="slice s1"></div> <div class="slice s2"></div> or : <div class="slice s1"> <div class="slice s2"></div> </div> How can I do that dynamically or using css? I tried to do it setting the background-image and the background-position of the two div , but the new image is not the same, it's no longer responsive. 回答1: This is a cool question and doable. So long as

Cannot find a responsive size for a container of width=0px and data-ad-format=auto adsense

£可爱£侵袭症+ 提交于 2019-12-12 12:12:30
问题 I'm trying to add an adsense responsive ad in a mobile site but I'm receiving the following error: Cannot find a responsive size for a container of width=0px and data-ad-format=auto The site is a mobile site built using JQuery Mobile 1.3. I set a width to the banner div container. I want to add the banner inside a ul: <li> <div style="width: 100%">[Banner]</div> </li> I added a similar banner into another view and it works perfectly. Has someone had this problem? Thanks. [EDIT] Well, if

How do I make use of breakpoints in Zurb foundation 4?

对着背影说爱祢 提交于 2019-12-12 11:13:06
问题 I would like to have 3 breakpoints. Broadly speaking, I want to configure my grid for small, medium and large panes. Looking at the docs for foundations grid, example classnames are provided for "small" and "large". However, I suspect foundation can be more flexible then that. So I looked at the file _foundation-global.scss. Sure enough, it seems to have maths function and variables for a range of pane sizes. In the docs for grid, I can see classnames like 'small-12' and 'large-3'. Ideally I

Force height of <div> to match image

被刻印的时光 ゝ 提交于 2019-12-12 10:10:00
问题 I'm building a responsive page that has an image and <div> side by side: The width and height of the image retain their proportions and expand/contract with the browser window. The width of the <div> does the same, but I'd like it to match the image in terms of height. Is there any way of achieving this? Here's a Fiddle of the problem: http://jsfiddle.net/alecrust/xwJHw/ 回答1: You can use display:table property for this. Write like this: section{ display:table; width:100%; } .text-box,.image{

Optimized web image resolution for iPad Pro display

会有一股神秘感。 提交于 2019-12-12 10:09:01
问题 I'm creating a header image (full screen width) for a responsive website. What's the optimal resolution that will still look good on the 12.9" iPad Pro? My normal workflow is to create an image at 72 PPI in Photoshop. The specification shows that it has a resolution of 2732 x 2048 at 226 pixels per inch. I don't want it to look pixelated when viewing on iPad Pro in landscape mode. 回答1: iPad Pro actually has 2732 x 2048 pixels that it uses to display the screen but we the user sees this

How to make image responsive inside a div

。_饼干妹妹 提交于 2019-12-12 09:34:32
问题 My code is as Follows: <div class="abc"> <div class="bcd"> <a href="#"> <img class="img1" width="50" height="50"/> </a> <a> <h3>Some Text</h3> </a> </div> <div class="bcd"> <a href="#"> <img class="img1" width="50" height="50"/> </a> <a> <h3>Some Text</h3> </a> </div> <div class="bcd"> <a href="#"> <img class="img1" width="50" height="50"/> </a> <a> <h3>Some Text</h3> </a> </div> <div class="bcd"> <a href="#"> <img class="img1" width="50" height="50"/> </a> <a> <h3>Some Text</h3> </a> </div>

Making an animating arc in d3 responsive?

前提是你 提交于 2019-12-12 08:55:27
问题 I was looking at this animation in d3, http://bl.ocks.org/mbostock/5100636 And I was wondering is there any way to make this responsive, so that the size changes with resizing of the browser window ? Or if it would be easier using raphael.js ? Here's the code : <!DOCTYPE html> <meta charset="utf-8"> <body> <script src="http://d3js.org/d3.v3.min.js"></script> <script> var width = 960, height = 500, τ = 2 * Math.PI; // http://tauday.com/tau-manifesto // An arc function with all values bound

Responsive Site Not Working In IE (Despite css3-mediaqueries.js)

心已入冬 提交于 2019-12-12 08:48:10
问题 I'm creating a Responsive Website but cannot seem to get it to work in IE (I'm testing in IE8). Now, I know that Internet Explorer 8 and below doesn't support CSS3 media queries. But I included the css3-mediaqueries.js Javascript file (hosted by Google) and it still doesn't work. I stripped out all the code leaving the very minimum (literally only 26 lines of HTML and a combined 34 lines of CSS). The HTML successfully validates as HTML5 and the CSS validates as CSS level 3. Here's the code:

Execute jQuery only on desktop site - Don't execute jQuery on Mobile [duplicate]

夙愿已清 提交于 2019-12-12 08:17:01
问题 This question already has answers here : Auto detect mobile browser (via user-agent?) [closed] (16 answers) Closed 5 years ago . I am trying to get this code to function only a desktop - basically i want to disable this jQuery for mobile devices. I tried a few ways recommended here, but I couldnt get them to work - but I'm not ajavascript person so it could have been the way I was implementing them. <script type="text/javascript"> jQuery(document).ready(function($){ $('.gilidPanel-opener a')