The functionality of Responsive CSS seems to be inconsistent, as it only works partially

Hey everyone, I'm struggling with my responsive CSS code. It seems to be working fine with max-width: 321px but not when I try max-width: 500px. I'm trying to figure out what I'm doing wrong and would really appreciate some help.

/*/Mobile MAINCSS/*/

img {

    max-width: 100%;
    height: auto;
}

@media screen and (max-width: 320px) {

    /*/Nav and Header/*/

    iframe {

        width: 100%;
        height: 700px;
    }

    body {

        color: red;
    }

    #nav {

        display: none;
        width: 100%;
    }

    #logomain {

        width: 100%;
        height: auto;
        display: none;
    }

        .logo {

            display: none;
        }

        .logoright {

            display: none;
        }

    .mobile-number {

        display: block;
        text-align: center;
        background:#333399;
    }

    .mobile-number a:link {

        color: red;
        text-decoration: none;
    }

    .mobile-number a:visited {

        color: red;
        text-decoration: none;
    }

    #head_wrap {

        width: 100%;
        height: auto;
    }

    #head {

        width: 100%;
        height: auto;
    }

    /*/Mobile Navigation/*/

    #mobilenav {

        display: block;
        margin: 0 auto;
        width: 100%;
        height: auto;
        background: #333399;
        color: white;
        font-size: 18px;
        text-align: center;

    }

    .mobile ul {

        display: inline;
        margin: 0 auto;
        width: 100%;
        height: auto;
    }

    .mobile ul li {

        display: inline-block;
        padding: 10px;

    }

    .mobile a:link {

        color: white;
        text-decoration: none;
        font-weight: bold;
        text-shadow: 1px 1px 1px black;
        border-radius: 5px 5px 5px 5px;
        padding: 5px;
    }

    .mobile a:visited {

        color: white;
    }

}

    /*/Content/*/

    #content {

        width: 100%;
        height: auto;
    }

    #content_wrapper {

        width: 100%;
        height: auto;
    }

    #bizmain {

        width: 100%;
        height: auto;

    }

    .bizexpress {

        float: none;

    }

    .bizpro {

        float: none;

    }

    .pro {

        float: none;

    }
    /*/Footer/*/


    #footer {

        width: 100%;
        height: auto;
    }

        /*/Additional Updates 02/28/2015/*/

    .main-right {

        width: 100%;
        height: auto;
        text-align: center;
    }

    .main-left {

        width: 100%;
        height: auto;
        float: none;
        text-align: center;
    }

    .form {

        width: 100%;
        height: auto;

    }

    .form-control {

        width: 50%;
    }

    .input-group-addon {

        font-size: inherit;
    }

    /*/Website Design/*/

    .evoke {

        width: 100%;
        height: auto;
    }

    .evokeemotions {

        width: 100%;
        height: auto;
    }

        .resource1 {

        float: none;
        text-align: center;
    }

    .resource2 {

        float: none;
        text-align: center;
    }

    .resource3 {

        float: none;
        text-align: center;
    }


}

Answer №1

@media screen and (max-width: 500px) 
{
}
@media screen and (max-width: 320px) 
{
}

It is correct to prioritize the CSS for 500px above 300px. Thank you for pointing that out!

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Can anyone recommend a high-quality jQuery lightbox replica?

Key Features Needed: Customizable with CSS Capable of handling forms, not just images Extensively documented Please provide any recommendations and suggestions for suitable options. Thank you in advance ...

Initiating CSS animation from the start

Having an issue with the "Start button" that plays both animation and background sounds. When I pause it, the animation does not stop where it left off and starts from the beginning again. I tried using animation-play-state: pause and animation-fill-mode: ...

Using Bootstrap, Express, and Node.js to create a login form

As I am new to node.js and express, I am still trying to understand the basic functionality. Currently, I have a simple sign-in form where I want to load another HTML page and call a node.js function upon clicking the sign-in button. What would be the best ...

exploring numerous boxes in an engaging and educational tutorial

Explaining this in the title was a bit tricky, but what I want to create is an interactive tutorial. In this tutorial, the user will click on an area or product they want to clean or use for cleaning. After clicking, another box with relevant information w ...

Populate an HTML5 arc with an image - Leveraging the power of HTML5 Canvas

I'm working with an HTML5 Canvas (JSFiddle) that currently displays circles created using the following function: function createball(x,y,r,color){ context.beginPath(); context.arc(x,y,r,0,Math.PI*2,true); context.fillStyle = color; c ...

The persistent underline on the tooltip just won't go away

Hey there, this is my first time posting a question here so I hope I got everything right! I'm currently in the process of creating a form for a WordPress site using Bootstrap. I need to incorporate tooltips with Font Awesome icons, but for some reas ...

What is the best way to utilize XPATH effectively within scrapy?

Explore more here Check out this link too: https://i.stack.imgur.com/8bhzV.png If you are struggling with finding the red marked box number, take a look at the image on this link: https://i.stack.imgur.com/mca05.png Don't worry, I have provided my ...

Code for switching between accordion panels with a simple button press

I took some code snippets from a website and developed a shopping cart accordion module. The complete code is available on my CodePen profile, you can access it through this link: http://codepen.io/applecool/pen/YXaJLa <div class="summary"> <but ...

Customizing the initial page layout in Elm

I am new to Elm and I need help with a particular issue. Can someone provide guidance or direct me to a useful resource for solving this problem? The challenge I’m facing involves editing the start page of a website by removing specific elements, as list ...

Reading values from a properties file using HTML

Here's a snippet of my HTML code: First name: <input type = "text" > Last name: <input type = "text"> Instead of manually inputting the field values (First name, Last name) in the HTML, I am interested in reading them ...

Adjusting the position of just a single box in a flexible layout

I have multiple columns set up in a similar way. <div style="display: flex;flex-direction:column"> <main class="main-contents" role="main">TopHeader </main> <div> content A</div> <div> conte ...

Center flex items along the vertical axis

IMAGE <div className="d-flex align-items-center"> <img src={member.user_profile_image} width="41" height="41" alt="" ...

Having difficulty encapsulating three.js rendered particles within a single div

I'm facing an issue where the particles generated by my three.js project are not contained within a specific div or html element as intended. Instead of staying within the designated boundaries, the particles are spreading across the entire DOM witho ...

Tips for updating the color of table data when the value exceeds 0

I'm currently working on developing a transaction table that is intended to display debit values in red and credit values in green. However, I would like these colors to only be applied if the value in the table data is greater than 0 via JavaScript. ...

Discover how to execute a function depending on a specific button in Node.js using Express

How can I trigger a function based on which button is clicked? I am working with an EJS file named test.ejs <form> <input type="submit" value="Click here 1"></input> <input type="submit" value="Click here 2">&l ...

Aligning a div within another div and organizing its elements

Hey everyone, I'm struggling with centering a div that contains two Tumblr posts columns, as shown in the screenshot linked below. I really want it to be centered on the page where there is no sidebar present. Additionally, I'm hoping to get the ...

The animation isn't loading

I discovered a handy script that displays a waiting message when my form is submitted. I implemented jquery-ui to showcase this message in a dialog box, and it was successful. However, upon customizing the text and adding an animated gif background using C ...

I am in search of a container that has full height, along with unique footer and content characteristics

I have set up a jsfiddle to demonstrate the scenario I am facing: There is a basic header, content, footer layout. Within the content-container is a messenger that should expand to a maximum of 100% height. Beyond 100% height, it should become scrollable. ...

Ways to customize bullet points?

Is there a way to customize the bullet points in HTML? All my bullet points are displaying as stars instead of the standard black circle for the main bullets and a hollow circle for the sub-bullets. I attempted to set the style using list-style-type:disc ...

Image broken on default bootstrap navbar

On my computer where I am developing a Ruby on Rails app, I have a relative link to an image. To customize the style, I am using Bootstrap and have used their code to source the image for the top left brand placement. You can view the Bootstrap link here. ...