responsive-design

Responsive Background image with particle js

穿精又带淫゛_ 提交于 2019-12-25 07:49:03
问题 I am using the floowing code: application.html.erb file: <!DOCTYPE html> <html> <head> <title>Rubiksolutions</title> <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> <%= csrf_meta_tags %> </head> <body> <div> <nav> <div class="cube"></div> <div id="nav_wrapper"> <ul> <li><%=image_tag("name.jpg", :size => "150x40")%></li> <li><a>Inicio</a></li> <li class="submenu"><a>Productos</a

Trying to fix my navigation bar for mobile devices

烂漫一生 提交于 2019-12-25 07:32:16
问题 I'm designing a responsive website and right now i have bit of a problem. Basically logo is set in the middle of the navigation but when i tried viewing it in mobile or set my browser for mobile it looks like this. http://i255.photobucket.com/albums/hh140/testament1234/responsive_zps3a22ab61.jpg This is what it looks like in full screen. http://s255.photobucket.com/user/testament1234/media/desktop_zps4c60a09c.jpg.html How do I set the logo on top of the navigation when viewed in a mobile

media queries in responsive design

时光毁灭记忆、已成空白 提交于 2019-12-25 06:59:30
问题 I'm creating a responsive website. For the CSS for smaller monitors I wrote this: @media only screen and (min-width: 1224px) and (max-width: 1440px) { /*css here*/ } and the HTML part for the css: <link rel="stylesheet" type="text/css" media="screen (min-width: 1224px)" href="css/monitor.css" /> and when I create the css for smartphones: html: <link rel="stylesheet" type="text/css" media="(min-width: 320px)" href="css/mobile.css" /> css: @media handheld and (min-device-width: 320px), handheld

Avoid the Meta Viewport Tag in Responsive Design - Google Insights Score

不问归期 提交于 2019-12-25 06:58:07
问题 I have designed my site to be responsive without actually using <meta name="viewport" content="width=device-width, initial-scale=1.0"> It looks just the way I want it on mobile. The problem is, when I go to Google Insights, which to test if my site is mobile optimized, it says it is not. When I add the meta tag, it says my site is mobile optimized (even though it looks a lot worse to a human being). My question is, can get around using the meta viewport tag while still having Google Insights

Show and hide div with Window Size JavaScript?

余生颓废 提交于 2019-12-25 06:38:07
问题 I'm trying to show a div based on two or preferably three defined window sizes for mobile. I'm currently trying to implement: <script> if( $(window).width() > 768 ) { $('#div1').show(); $('$div2').hide(); } else { } if( $(window).width() < 768 ) { $('#div1').hide(); $('$div2').show(); } else { } </script> But it isn't working what am I doing wrong here? 回答1: Your div2 selector is wrong. It should be a # not a $ . Also, you should consider using media queries for this! #div2 { display: none; }

Center div position

江枫思渺然 提交于 2019-12-25 06:36:37
问题 I try to display images in six separate div's . All div are placed with correct position .but center div position look likes one is going upward and other center div is going downward i also post image so you better to understand what i trying to say and also i post HTML and CSS code .. image .cat_section { text-align: center; } .cateogry_div { display: inline-block; float: none; background-image: url('http://elemisdesign.com/img/114/1.jpg'); width: 300px; height: 200px; margin-top: 90px;

how do you change img src with javascript depending on browser width?

夙愿已清 提交于 2019-12-25 06:08:45
问题 I would like to change the source of the image element with the id of "front". I have a basic script at the top, but it doesn't work. I was just attempting to come up with something but I'm very bad at JavaScript. <html> <head> <link rel="stylesheet" type="text/css" href="home.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="home.js"></script> <script type="text/javascript"> var reswidth=screen.width; if (reswidth<400){ var x =

how do you change img src with javascript depending on browser width?

我的未来我决定 提交于 2019-12-25 06:08:14
问题 I would like to change the source of the image element with the id of "front". I have a basic script at the top, but it doesn't work. I was just attempting to come up with something but I'm very bad at JavaScript. <html> <head> <link rel="stylesheet" type="text/css" href="home.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="home.js"></script> <script type="text/javascript"> var reswidth=screen.width; if (reswidth<400){ var x =

Responsive design not working for text

天涯浪子 提交于 2019-12-25 05:59:27
问题 I want to make a responsive design for my page, I have made the layout and it is working perfecty on resizing but when I add text in my page and then resize it, things get mess up. It is because the layout is resizing itself accordingly but the text is not resizing itself. How it will be solved? Here is the html code: <body> <div id="mainpage"> <div id="menu"> <div id="menuhomepage"><a href="#"></a></div> <div id="menublog"><a href="#"></a></div> <div id="menuphoto"><a href="#"></a></div>

Bootstrap responsive horizontal layout

佐手、 提交于 2019-12-25 05:14:38
问题 I have a Bootstrap layout but I need it to be responsive and not sure how to do this horizontally. How can I make that layout using standard Bootstrap layout but also have it be responsive? I currently have it with the "labels" in one fluid row and the inputs in another fluid row but when it is "shrunk", the labels no longer fit with the inputs. 回答1: Have you considered nesting by making a single .row-fluid with five .spans inside it and two more .row-fluids inside each span? This way there