Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4

Thread: moving on

  1. #1
    Senior Member
    Join Date
    Jan 2014
    Posts
    392
    Member #
    38172
    Liked
    4 times

    moving on

    im going to spend the rest of the day doing a few tutorials on html and css, compiling notes and whatnot then i want to move on to responsive webdesign.

    just wanted to ask am i jumping ahead of myself? i looked it up and read about these things called media queries, are these a part of javascript? oh no, googled, they are a part of css3. so are they just a bit of code or are they an extra file? are they the kind of thing thats custom built by the designer (me) or are they like pre bought?

    thanks

  2.  

  3. #2
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,139
    Member #
    27197
    Liked
    959 times
    Media queries are just blocks of CSS that say "if the viewport width is smaller (or larger, or a number of other possibilities) than x width, style the given elements differently.

    For instance. Let's say you have a div, and you want that div to have red background on desktop, but blue on mobile.
    You would style it normally like so:
    Code:
    div {background: red;}
    Then, after that, you'd add a media query for mobile, let's say screens smaller than 480px wide:
    Code:
    @media (max-width:480px){
      div {background:blue;}
    }
    Charging different rates is up to you. I charge more for it, but include it standard, and if they specifically don't want it, I lower the price.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  4. #3
    Senior Member
    Join Date
    Jan 2014
    Posts
    392
    Member #
    38172
    Liked
    4 times
    oh not too complicated i guess. is @media the only selector for it? by my understanding, with a complicated webpage its basically like building a stylesheet within a stylesheet?

  5. #4
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,139
    Member #
    27197
    Liked
    959 times
    @media is how the query is started, but there's a lot of potential options. It is somewhat a stylesheet within a stylesheet, I suppose.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:44 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com