WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] iPad portrait media query not working for TwentyEleven Child (7 posts)

  1. kubegusa
    Member
    Posted 1 year ago #

    Hi

    I have a twentyeleven child theme. http://www.demaeyer-co.be/
    I've made it responsive for iPhone and such, and the only media query that doesn't seem to work is for iPad Portrait form. The issue is that the site title needs to be moved up, like for iPhone and such. I am testing the layouts using http://www.responsinator.com

    This is the code I have:

    /*iPad*Portrait*/
    
    @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
       #branding #access li {
          font-size: 12px;
    	  margin-top: 0;
          /*width: 100%;
          text-align: center;
    	  line-height: 6px;
    	  display:inline-block;*/
      }
    
     #site-title {
    	margin-right: 0;
    	padding: 0.5em 0 0;
    } 
    
    #site-title a {
    	color: #044c72;
    	font-size: 16px;
    	font-weight: bold;
    	line-height: 12px;
    	text-decoration: none;
    	font-family: 'Verdana', sans-serif;
    	text-shadow: 1px 1px 3px #ffffff; /*shadow around site title*/
        /*filter: dropshadow(color=#ffffff, offx=2, offy=2);/*shadow around site title*/
    
    }
    
    #site-description {
    	color: #1087be;
    	font-size: 12px;
    	margin: 0 0 0 0;
    	font-weight: bold;
    	font-family: 'Verdana', sans-serif;
    	text-shadow: 1px 1px 3px #ffffff;
    
    }
    
    }

    Any help would be much appreciated! Thanks.

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Have you validated your CSS - looks like you have a couple of errors in your child theme CSS:

    http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.demaeyer-co.be%2F&profile=css3&usermedium=all&warning=1&vextwarning=&lang=en

  3. kubegusa
    Member
    Posted 1 year ago #

    Hm, thanks for that - I never heard of validating CSS, I'm learning as I go...

    In trying to read the validation results, I see that the main twentyeleven theme brings up errors. How odd?? Should I try to correct them? They don't seem related to what I'm doing though...

    And then I can see that 2 media queries in the child theme are bringing up an error also. But the error is about code that is commented out.

    So I don't actually see a validation error in the media queries that are in use.

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    No, don't worry about the twentyeleven errors -- those are not causing problems. But the parse errors in your stylesheet are problematic -- look for unclosed or extra brackets or other syntax errors.

    You might try removing the commented sections -- that in and of itself is not problematic, but it often makes it harder to find the real errors.

  5. kubegusa
    Member
    Posted 1 year ago #

    OMG thank you!! I did take a second look at the parsing errors that were presented, and I did find a } that was just hanging out with no purpose, and removing it fixed the issue. Sweet lord, I have been looking for this for weeks (off and on). Thank you so much!

  6. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    LOL - yeah, it's kinda amazing how one teeny bracket can cause so much grief and hair-pulling! Validating is your best friend when you run into any issue. There's a validator for HTML too:

    http://validator.w3.org/

  7. kubegusa
    Member
    Posted 1 year ago #

    thanks, you rock!

Topic Closed

This topic has been closed to new replies.

About this Topic