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 5 of 5
  1. #1
    Junior Member
    Join Date
    Jul 2013
    Location
    El Masnou, Barcelona
    Posts
    3
    Member #
    36687

    Media query's ignoring me

    Hi, I'm pretty new to web design and I'm building a website using html, css and php while I learn.

    I'm planning the webpage to be responsive to support different screen resolutions altough I'm planning to build a separated mobile version.

    The problem is that my media query's are being ignored, and I'm just doing the same I did in previously with exit.

    The media query in question is the following:

    @media only screen and (max-width: 1367px) and (min-width: 1025) {

    body {
    width: 90%;
    }

    ul#social li a {
    margin-left: -76px;
    width: 90px;
    height: 80px;
    }

    header nav .navLogo {
    display: none;
    }

    .contact_form ul {
    width: 100%;
    }

    .contact_form label {
    width: 17%;
    }

    .contact_form input {
    width: 40%;
    }

    .contact_form textarea {
    width: 70%;
    }

    .mapinfo {
    float: left;
    margin-bottom: 2%;
    }

    }

    You guys know where the problem is? What am I doing wrong?

    Also forgot to tell that the media queri's are at the end of the stylesheet, so that's not the problem. And I'm testing it using Chrome 27.0.1453.116 m.

    Thank you in advance.

    BTW, there's no introductions sub-forum?

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Seems like it should work on the surface...but without a page to see, everyone's just going to be guessing. So please share the link that you're trying this media query on and someone might be better able to help you.

    The introductions forum may have been lost in translation. WDF recently migrated from XenForo to vBulletin, so something might have happened in that process. I really don't know. At any rate..hi!
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Junior Member
    Join Date
    Jul 2013
    Posts
    1
    Member #
    36688
    Try adding this inside of your head tag.

    HTML Code:
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!--[if lt IE 9]>
    		<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
    <![endif]-->

  5. #4
    Junior Member
    Join Date
    Jul 2013
    Location
    El Masnou, Barcelona
    Posts
    3
    Member #
    36687
    Quote Originally Posted by TheGAME1264 View Post
    Seems like it should work on the surface...but without a page to see, everyone's just going to be guessing. So please share the link that you're trying this media query on and someone might be better able to help you.

    The introductions forum may have been lost in translation. WDF recently migrated from XenForo to vBulletin, so something might have happened in that process. I really don't know. At any rate..hi!
    I would sahre a link, but the page is offline and I can't put it onlyne until my domain transfer from one registar to another gets completed since I can't change DNS. It will finish in a couple of days (hopefully). If I haven't been able to solve it I'll post it then.

    Thank you.

  6. #5
    Junior Member
    Join Date
    Jul 2013
    Location
    El Masnou, Barcelona
    Posts
    3
    Member #
    36687
    Quote Originally Posted by chrisblakejones View Post
    Try adding this inside of your head tag.

    HTML Code:
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!--[if lt IE 9]>
    		<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
    <![endif]-->
    I just did it and specifying a (min-width: 900px) and a (max-width: 1337px) and it triggers belor 1920px and stops working at 1024px. It's just crazy.


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
  •  

Tags for this Thread

All times are GMT -6. The time now is 08:38 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com