No announcement yet.

Where to insert media queries

  • Filter
  • Time
  • Show
Clear All
new posts

  • Where to insert media queries

    Do I insert my media queries in my CSS.

    /* When the screen is less than 680 pixels wide, hide all list items, except for the first one ("Home"). Show the list item that contains the link to open and close the topnav (li.icon) */
    @media screen and (max-width:680px) {
    ul.topnav li:not(:first-child) {display: none;}
    ul.topnav li.icon {
    float: right;
    display: inline-block;


    /* The "responsive" class is added to the topnav with JavaScript when the user clicks on the icon. This class makes the topnav look good on small screens */
    @media screen and (max-width:680px) {
    ul.topnav.responsive {position: relative;}
    ul.topnav.responsive li.icon {
    position: absolute;
    right: 0;
    top: 0;
    ul.topnav.responsive li {
    float: none;
    display: inline;
    ul.topnav.responsive li a {
    display: block;
    text-align: left;


  • #2
    Correct, you put the media queries in the CSS and any of the CSS within the queries will only be used then the specific criteria is matched.


    • #3
      Solved, thank you very much.



      Fatal error: Uncaught exception 'Exception' with message 'MySQL server has gone away' in /data/built2go/hf_home/webm/public_html/htmlforums/vb/core/vb/db/query/update.php:120 Stack trace: #0 /data/built2go/hf_home/webm/public_html/htmlforums/vb/core/vb/db/query/update.php(101): vB_dB_Query_Update->doUpdates() #1 /data/built2go/hf_home/webm/public_html/htmlforums/vb/core/vb/db/assertor.php(283): vB_dB_Query_Update->execSQL() #2 /data/built2go/hf_home/webm/public_html/htmlforums/vb/core/vb/db/assertor.php(518): vB_dB_Assertor->assertQuery('session', Array) #3 /data/built2go/hf_home/webm/public_html/htmlforums/vb/core/vb/session.php(520): vB_dB_Assertor->update('session', Array, Array) #4 /data/built2go/hf_home/webm/public_html/htmlforums/vb/core/vb/library/user.php(911): vB_Session->save() #5 /data/built2go/hf_home/webm/public_html/htmlforums/vb/core/vb/mail.php(437): vB_Library_User->updateEmailFloodTime() #6 /data/built2go/hf_home/webm/public_html/htmlforums/vb/core/vb/mail.php(131): vB_Mail->send() #7 /data/built2go/hf_h in /data/built2go/hf_home/webm/public_html/htmlforums/vb/core/vb/db/query/update.php on line 120