Responsive Design and @media queries

I thought my HTML/CSS guns were loaded and good to go; and then I started reading about responsive web design!
If I have a rule declared in the main body of my CSS and add a media query what happens to the existing rule?
It looks to me with my experimenting so far that if I take a style in the main section and duplicate that with some edits for a smaller width, I have to then remove it from the original and replicate it in another @media query.  Is that correct? 
So if I have this:
header {
    background: url("images/headerhand.png") no-repeat scroll left top transparent;
    height: 300px;
    margin: 40px auto 0;
    min-height: 300px;
    text-align: left;
    width: 100%;
I need to put this in a @media query for the below break point:
header {
    background: none;
    height: 300px;
    margin: 40px auto 0;
    min-height: 300px;
    text-align: left;
    width: 100%;
I then take the rule out of the main section of my style sheet and put that in another media query for the above break point.
So if I have a header element with background image and color, and border-radius and whatever but only want to lose the background image at a certain break point, I then need two @media queries one for below the break point and one for above and then remove the whole rule from the main section of the site?
Oh my, that was so complicated, I am not sure I even understand my own question!
Martin
PS "Mobile First" is starting to make a lot of sense!

osgood_ wrote:
pziecina wrote:
Hi Os
As an example, (using Jennys Chocolate Cookies) would it not make more sense to design a mobile only web site, complete with geolocation that shows the nearest outlet selling the cookies?
So you are saying forget the desktop monster (assign that to the bin) and convince the client mobile is the way to go? Even if that is the case it still seems that you're going to need two or three different design set ups to satifsy the majority of devices, which means more expense, right? Plus from what I've seen the information all crushed into a 400px wide screen looks a bit shite, no?
Reply -
No I am saying that one should offer the type of site/service that best suits the clients needs, be this a desktop, responsive or mobile only web site, or even telling the client that an advert in yellow pages would be better.
pziecina wrote:
The same may also apply to a restaurants web page, after all it is often the directions to the restaurant, and its proximity to oneself that are important when one is looking for somewhere to go out for a meal, is it not?
Can't see what location or direction has to do with anything or proximity to oneself. I look in yellow pages if I need a restaurant or I identify it on the computer before I go out........but then again I'm old so maybe younger people do all this whilst they are out. So we come down to demographics - cut out whatever section of society at your own peril. I guess a nightclub would be a better example, can't see many 50 plus year olds wanting to know where one of those are on the move.
Reply -
So you are out and about, or driving home and suddenly decide that you would like to go for an Indonesian meal, do you now get the yellow pages out?
BTW - I am over 60.
pziecina wrote:
As for testing on mobile devices, a good testing set-up now costs less than £400, ($600) and most items one will already own.
They are -
1  A smartphone, (most people have one now and a good budget smartphone can be purchased for under £70.00)
2. A tablet device, (An budget android device now cost about £120.00, and can also be used as an e-reader)
3. A iPod-Touch (If it works on this it will also work exactly the same on the iPhone)
Well I guess you have to factor in the cost of getting connected to the net on these mobile devices to check everything. I dunno if anyone in the UK offers a reasonable monthly package whereby you can be connected to all these devices 24/7 and not rack up any additional charge per minute.
Reply -
Use Shadow and your home wifi network, extra cost nothing.
PZ

Similar Messages

  • DW CC Responsive Design and BC tags

    Hi All,
    I am going through the recent Adobe tutorials on Responsive design using DW CC and I have a couple of questions.
    Has anyone tried setting up a DW CC responsive design for a BC site yet, using the new functionality in DW CC?
    Is it OK to insert BC module tags into a design, ie a tag for a menu, and will they work? Or will the BC module javascript clash with the responsive javascript?
    Also, the tutorials talk about coding up webpages to be responsive, where I will be wanting to code up a template as being responsive, with the BC tag_pagecontent tag inserted where the content is going to be.
    Also with the tutorials so far I am having problems doing the following:
    - inserting two divs inside another div with a large background image and positioning these two divs over this background div.
    Anyway, I am continuing to work away at rendering my design into a responsive layout, following the recent Adobe videos.
    If anyone else had/is doing the same please let me know how you went.
    PS. I am only interested in replies about using DW CC to create a responsive design, as I am not able to hand code that kind of thing from scratch in Notepad. lol!

    Mary,
    Have you had a look at using a framework. Responsive frameworks include:
    Twitter Bootstrap - http://twitter.github.io/bootstrap/
    Skeleton - http://www.getskeleton.com/
    Foundation - http://foundation.zurb.com/
    We had a discussion on Sandpile yesterday about using Frameworks. Recording here: http://experts.adobeconnect.com/p6hmzy2oipt/
    Also, Scott did a presentaion on Responsive design : http://experts.adobeconnect.com/p4ryiohpfjs/
    Hope this helps.

  • Responsive design and interacting elements

    Is there anyway inside of Adobe Edge Animate CC 2014 for elements inside a responsive project to interact with each other. For example, I want the text to be able to condense (width-wise) as I resize the width (%), and doing so will increase the text height-wise. I want that new height to influence the location of an element below it and have that element be pushed down.
    This leads to another question, does the height of the parent (stage) increases as well to contain the new height of a child element (text, div, etc...)? It seems to me that a lot of these elements inside are placed absolutely, or fixed relative to parents. So is there anyway inside a responsive document to have elements still be in the normal flow?

    Steve,
    You can record software simulations slides inside a responsive project, in 8.0.1.242, using the Slides button, Software simulation. But do not insert a separately created normal software simulation project in a responsive project. If  you created it as a normal project, it will not have the responsive styles, will not adapt. The software slides created in a responsive project, will offer you a zoom/pan suggestion for the mobile breakpoint view that has a much smaller total resolution than Tablet and Primary. You can always customize the suggested pan/zoom.

  • Responsive design and video html5

    I am working on a new site in dreamweaver using Skeleton V1.0.2. The images work great, the problem is with the video. When I resize the Dreamweaver window it looks great works perfectly but when I check it on my Iphone it resized horizontally but not veritcally it add black bars to top and bottom, only on the Iphone work fine in all the browser I've checked and even on Droids. Any help would be appricated www.shargraphics.com/new-site

    Fix your code errors.
    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.shargraphics.com%2Fnew-site%2 F
    My advice is to remove the height and width attributes from your video HTML.  Use CSS instead.
    video {max-width:100%}
    Nancy O.

  • Insert images and text in header for responsive design cc

    I am having a issue with inserting a logo, company name and Facebook graphic into my header.
    I started setup of a responsive design and added a responsive header along with other areas below.
    I want the Logo to stay on the left, the company name to the right of the logo and the Facebook graphic on the right side of the header.
    I keep making a mess and can't get anything to line up correctly.
    I am using Adobe Dreamweaver CC and trying to control with CSS.
    I am just starting to learn the new CSS Designer in CC. I liked the old CSS console better.

    Basically, you need to float all 3 elements left and give them a width of 33.33% (3-across).
    header #logo,
    header h1,
    header #fb {
         float:left;
         width: 33.33%;
    HTML:
    <div class="gridContainer fluid">
         <header>
              <div id="logo">Your logo here</div>
              <h1>Your Site Name</h1>
              <div id="fb">Facebook here</div>
         </header>
    Nancy O.

  • I am having trouble getting buttons to work in Captivate 8 trial version using a responsive design template. Any suggestions?

    I have a trial version of Captivate 8 that I am evaluating to determine if it will be an option to replace a software we currently use. However I am having a lot of trouble getting even the simplest of tasks to work using the responsive design template. To troubleshoot I created 2 projects 1st a completed empty project using responsive design and a 2nd blank project using the blank project template. I created an audio file that the button, when pressed, will play. I can place a button on first slide of both projects, rollovers work fine, but in the responsive design project buttons will not work to trigger the action. Is this a known issue in the trial version?

    A Blank project is a normal cptx-project, not a responsive project, it has no breakpoint views like a responsive project, it is meant to have always the same layout but on publishing you can choose to have it 'rescale' automatically.  A responsive project allows you to create slightly different layouts for the three breakpoint views: Primary (desktop/laptop/landscape on tablets), Tablet (portrait on tablet) and mobile (phones, where the browser has much lower resolution than the real phone resolution). The 'look' of a project, whether it is responsive or not will be defined by the Theme that is the default theme at that moment, and with the default theme colors that you have at that moment. I think in newbie mode the default theme is White (not sure, never used newbie mode). If you choose another theme as default theme, a blank project and a responsive project will open with that theme applied to it. All themes coming with CP8 are responsive, but you can use them also for normal projects, in that case you only use the object styles for Primary view. Each object style normally has 3 versions, for the 3 breakpoint views.

  • Captivate8: Drag&Drop not possible in a responsive design?

    Is it possible to create a Drag&Drop Interaction within a responsive design? (Captivate 8)
    I can't open the Drag&Drop Menu, I can't select it.

    I've also completed the form to request new features. But in the meantime could I ask how people get around this?
    We have several courses created for desktop computers which include drag and drop tasks, and feedback from learners is that they would like to be able to access them on mobile devices. So as I understand it we have three options:
    Create separate courses for mobile devices, using responsive design but losing the drag and drop tasks. This would mean we have two versions of each course, one for desktop and one for mobile, which may cause issues with updating, etc, and the mobile user won't get quite the same learning experience as they'll lose the drag and drop tasks.
    Adapt the main desktop course so it is responsive, and lose the drag and drop altogether. This has the advantage of everyone seeing the same course and it only needing updating once.
    Don't use responsive design and display the course in the same way on a desktop as on a tablet. This may be fine for larger screen tablets, but wouldn't be great for smaller tablets or phones as you'd need to do a lot of zooming and scrolling.
    I'm just wondering what you all do to get around it?

  • If Muse does not support responsive design, can someone tell me why I have seen 100% browser width

    If muse does not support responsive design (and therefore cannot adapt to the differing sizes in browser width of different devices, so I understand it) , as I have read on these forums and been told by Adobe's support tech's via chat support, can someone please explain how the 100% browser width slideshows that I have seen on Adobe's featured Site of the Day sites, were acheived? Are these sites only able to display correctly on the same size screen? If I cannot create a site in muse that displays a constant design on a laptop, desktop, or tablet screen, then why should I use this program at all, and why isn't that dislcaimer right up front to save folks like me hundreds of dollars in cloud subscription fees and hours designing a site only to find out that it will look like crap on 2 of the three devices any one uses to view it???? I was sent here for this question by the support team at Adobe. Hopefully someone has a workaround, because Adobe apparently are nonplussed.

    If muse does not support responsive design (and therefore cannot adapt to the differing sizes in browser width of different devices, so I understand it) , as I have read on these forums and been told by Adobe's support tech's via chat support, can someone please explain how the 100% browser width slideshows that I have seen on Adobe's featured Site of the Day sites, were acheived? Are these sites only able to display correctly on the same size screen? If I cannot create a site in muse that displays a constant design on a laptop, desktop, or tablet screen, then why should I use this program at all, and why isn't that dislcaimer right up front to save folks like me hundreds of dollars in cloud subscription fees and hours designing a site only to find out that it will look like crap on 2 of the three devices any one uses to view it???? I was sent here for this question by the support team at Adobe. Hopefully someone has a workaround, because Adobe apparently are nonplussed.

  • I am using media queries and div will not centre on desktop version

    Hi,
    I am building a site for the first time using media queries. My problem is that I cannot get the header div (#layoutDiv1) to centre on the desktop version.
    I have pasted my code below, am I missing something?
    Any help would be great.
    Thanks, Alex.
    /* Mobile Layout: 480px and below. */
    .gridContainer {
      margin-left: auto;
      margin-right: auto;
      width: 100%;
      color: #FFF;
      background-color: #000;
    #LayoutDiv1 {
      clear: both;
      float: left;
      margin-left: 0;
      width: 90%;
      display: block;
      padding-top: 20px;
      padding-left: 20px;
      padding-right: 20px;
      padding-bottom: 20px;
    /* Tablet Layout: 481px to 768px. Inherits styles from: Mobile Layout. */
    @media only screen and (min-width: 481px) {
    .gridContainer {
      width: 100%;
    #LayoutDiv1 {
      clear: both;
      float: left;
      margin-left: 0;
      width: 90%;
      display: block;
      padding-top: 20px;
      padding-left: 20px;
      padding-right: 20px;
      padding-bottom: 20px;
    /* Desktop Layout: 769px to a max of 1232px.  Inherits styles from: Mobile Layout and Tablet Layout. */
    @media only screen and (min-width: 769px) {
    .gridContainer {
      width: 100%;
      text-align: left;
    #LayoutDiv1 {
      width: 1000px;
      padding: 20px;
      margin-right: auto;
      margin-left: auto;

    Because you don't have max-width to constrain the responsive design attributes from the tablet and phone are also then applied to the desktop because they are true.  Have you tried either setting a max-width or setting the clear and float to none in the desktop CSS?

  • Upgraded to v10 and now media queries aren't working.

    I upgraded to version 10 and the media queries are not working on a new site I'm working on . They worked fine on 9.01 and still are working fine on another machine that has 9.01. But not in 10.0.
    It doesn't matter if its a <link> Media query or a @media screen. They are not working!
    I tried to reinstall and I'm getting the same result.

    I have test my site and queries in all the browsers and Firefox is the only one acting up. It worked in v 9. It's like they are being ignored. Here's an example of a media query.
    I'm testing by resizing the browser window and also by loading a site through an iframe.
    @media screen and (max-width: 800px) {
    body { background: #ddd; }
    Can someone please get this fixed. Mobile designs rely heavily on css media queries.

  • Can we have two media queries about width(both same) of display in phone-tablet-pc mode design

    can we have two media queries about width(both same) of display in phone-tablet-pc mode design, one in css.file of template file and one in particular file embedded css style?

    Yes.

  • Media Queries and Orientation

    Below is an example of a media query I created via the Media Queries window.  I have placed this line of code (plus the preceding meta tag), on pages I specifically designed for viewing on mobile devices:
    <meta name="Viewport" content="width=device-width" />
    <link rel="stylesheet" media="screen and (max-width:480px)" href="/styles/mobile_480.css" />
    Is it necessary to also address the orientation issue of these devices (portrait/landscape) in the code string, and, if so, what is the proper syntax for doing so?  The Media Queries window only allows me to designate width and height, but no other parameters.  Do these "other parameters" have to be manually coded?
    I also want to add code later for tablet devices, which are also viewable in either orientation.  This is my test run using media queries, so I am hoping I am doing all of this correctly.  Gradually I am getting the hang of this.  Thanks for anyone's insight.
    PS: I am assuming that I have correctly written the code mentioned above.  If not, where have I gone wrong?
    Tks.

    Below is an example of a media query I created via the Media Queries window.  I have placed this line of code (plus the preceding meta tag), on pages I specifically designed for viewing on mobile devices:
    <meta name="Viewport" content="width=device-width" />
    <link rel="stylesheet" media="screen and (max-width:480px)" href="/styles/mobile_480.css" />
    Is it necessary to also address the orientation issue of these devices (portrait/landscape) in the code string, and, if so, what is the proper syntax for doing so?  The Media Queries window only allows me to designate width and height, but no other parameters.  Do these "other parameters" have to be manually coded?
    I also want to add code later for tablet devices, which are also viewable in either orientation.  This is my test run using media queries, so I am hoping I am doing all of this correctly.  Gradually I am getting the hang of this.  Thanks for anyone's insight.
    PS: I am assuming that I have correctly written the code mentioned above.  If not, where have I gone wrong?
    Tks.

  • Missing functions in DW CC - insert Spry and •Select Modify Media Queries.

    In DW CC under the "insert" menu there should be "spry" not there
    in Modify, there should be "media Queries" not there
    Are these in a new place? can't fid this stuff

    Pure CSS Drop-Menu
    http://jsfiddle.net/NancyO/zN7fU/
    CSS3 Dropdown Menus
    http://www.red-team-design.com/css3-dropdown-menu
    PVII's Pop-Menu Magic3 (commercial DW extension)
    http://www.projectseven.com/products/menusystems/pmm3/index.htm
    jQuery Superfish
    http://users.tpg.com.au/j_birch/plugins/superfish/
    jQuery MegaMenu 2
    http://www.geektantra.com/2010/05/jquery-megamenu-2/
    jQuery MeanMenu (responsive on mobile)
    http://www.meanthemes.com/plugins/meanmenu/
    Nancy O.

  • Dreamweaver CC How to edit styles across media queries and sizes

    I am creating a fulid grid/responsive website, using the standard Media queries offered by Dreamweaver CC when I start a new document.
    I have creative several DIVs to sturcture my page.
    I don't understand how to apply changes between the various media queries.
    Frist, I see you can drag the width of the boxes to adust how wide you want the portions to be. That I get. But what I don't understand is to apply different formatting/styles in the different screen sizes. There used to be a box that would pop up when you wanted to create a new class. Now I can't figure out which version of the screen to work in and how to make changes ONLY to one screen size.
    Here's an example of what I want to do:
    The main portion of my website has 4 categories, that I would like the user to be able to choose from to click on.
    On the mobile view, I want the image align left, text to the right of that, aligned left, and for the  background of each category to be the same color so that it looks like one big button on mobile.
    On tablet and desktop view, I want the image centered within the DIV, then the text centered under each image. I want the graphic image (which is in a circle) to stand out on a white background.
    In the tablet view, I have it organized by 2 rows and 2 columns.
    In the tablet view, I have it organized by 1 row and 4 columns.
    I hope this make sense.
    How do I signifyand create these changes? I have tried entering it in the code. That just seems to center it every image in every DIV (remember I want it aligned left in mobile) Or I tired entering it on the code in another way and that centered the image across the whole page, not just the DIV. HOw do I work around these problems? Do I need to make them all a class instead of a DIV? I am really confused....
    Please be nice as I am obviously a bit of a beginner and struggling with this basic concept. I appreciate any guidance or help that anyone has to offer.

    #1 Build mobile first.  Everything else is based on that primary layout.  Don't worry so much about content yet.  Just get your mobile layout in order.  Then build tablet and finally desktop.
    #2 Do not tamper with code in your FluidGrid.css or Boilerplate.css files.  These files are temperamental.  Use a separate external style sheet for your content styles.   That way if you do something wrong, it won't break the whole layout.
    #3 Keep your layout structure simple and uncomplicated.  No tables, no positioned elements.
    #4 Everything needs to be inside the <gridContainer> div.  If it's not, it won't be responsive.
    Nancy O.

  • Responsive Background Images with Media Queries

    Hello,
    I'm creating a mobile website in Dreamweaver and would like to use an image which will change with different device widths.  I'm using media queries with background images.  My problem is that in order for the background images to display, I need to assign a height to the div.  When the image is scaled down the height stays static, leaving white space beneath it.  There will be content below the image so the white space will push it down and look wrong.  Is there a way to use multiple images with media queries keeping the height responsive?  Thank you!
    @media screen and (max-width: 1024px) {
    #mainImage {
              background-image: url(../images/mainImageLarge.jpg);
              background-repeat: no-repeat;
              background-position: center top;
              background-size: 100%;
              height: 272px;
              border-top-width: 3px;
              border-top-style: solid;
              border-top-color: #FFF;
    @media only screen and (max-width : 480px) {
    #mainImage {
              background-image: url(../images/mainImageMed.jpg);
              background-repeat: no-repeat;
              background-position: center top;
              background-size: 100%;
              height: 107px;
              border-top-width: 3px;
              border-top-style: solid;
              border-top-color: #FFF;
    @media only screen and (max-width : 320px) {
              #mainImage img {
              background-image: url(../images/mainImageSmall.jpg);
              background-repeat: no-repeat;
              background-position: center top;
              background-size: 100%;
              height: 150px;
              border-top-width: 3px;
              border-top-style: solid;
              border-top-color: #FFF;

    Like this example:
    http://alt-web.com/FluidGrid/Fluid-4.html
    METHOD:
    Insert 2 images -- one for desktops and one for mobile.  Assign classes to each image. 
    <img id="banner" class="desktop" src="desktop_image.jgp" />
    <img id="banner" class="mobile" src="mobile_image.jpg"/>
    In your CSS, use display:none and display:block to show/hide.
    .desktop {
        display:block;
    .mobile {
        display:none;
    /* Special Rules for mobiles */
    @media only screen and (max-width: 480px) {
        .desktop {display:none}
        .mobile {display:block}
    Feel free to set your break points however you wish.
    Nancy O.

Maybe you are looking for