April_Nara
April_Nara

Reputation: 1046

Media Queries only partially working

I've been designing UI for a little while now but this is my first time using Media Queries. I'm trying to use:

<style media="screen and (min-width: 0px) and (max-width: 1280px)">
    #signature li a {height:35px}
</style>

With the HTML looking like this:

 <span id="signature" style="display: block;"><li ><a href="signedreports.jsp?p=signature">Manage Names</a></li></span>

I'm trying to have the style within the media query hold true whenever the code is on a 1280 X 1024 screen. When I load the page on a 1280 X 1024 screen it does work but when I click on the link on the page the style goes away. Maybe I'm doing something wrong with the Media Query? Do you know what I can do?

Any help would be appreciated.

Thank you.

Upvotes: 0

Views: 116

Answers (2)

Jay
Jay

Reputation: 792

Are you putting this as an inline style and not in a css sheet?

Try this inside your css file;

@media all and (max-width: 1280px) {
#signature li a {height:35px}
}

Upvotes: 2

Alex Wilson
Alex Wilson

Reputation: 2419

if I understand your question then here is one of the solutions DEMO

<div>
    <ul>
        <li><a href="signedreports.jsp?p=signature">Manage Names</a></li>
    </ul>
</div>




 li {
      list-style:none;
      font-size: 15px;
    }

    @media screen and (max-width: 600px) {
      li {font-size:30px; color: green;}
       }

Upvotes: 0

Related Questions