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

Having issues with the tailwindcss transformation not functioning properly, but the problem seems to resolve when directly incorporating it into the

Lately, I decided to start utilizing tailwindcss and I have noticed that certain properties do not seem to function at all. However, when I incorporate them into my CSS directly, they work perfectly fine. Allow me to provide an example. const Step = styled ...

I am interested in extracting information from the Firebase real-time database and showcasing it on my HTML webpage

I am struggling to display data from the Firebase real-time database on my HTML page. Even though I can see all the data perfectly in the console, it doesn't show up on the webpage. I attempted to use a for loop, but it still doesn't display the ...

Splitting a square into four triangles using CSS styling

My current challenge involves creating a square comprised of 4 triangles of equal size, each with hover events. Here is the CSS I'm using to create the triangles: .right, left, .top, .bottom { position: relative; width: 26px; } .right:before ...

Animating links with multi-line effects on :before.orEnhancing

As per the given query, I have a code snippet Is there any way to apply this effect to multiple lines of text instead of just one line? Currently, the effect only appears on one of two text lines (as shown in the example). :root { --00a3a3: #00a3a3; ...

Using Jinja2 to iterate through a dictionary while having the ability to choose which key-value pair to access

I'm attempting to generate an HTML table from data received on the web as a dictionary app.py: client = boto3.client('ec2') vpc_ids = client.describe_vpcs() for i in vpc_ids.get('Vpcs'): for tag in i.get('Tags'): ...

Creating visually appealing tables with nested tables using CSS for styling including borders and backgrounds

Looking to create webpages that have a variety of tables, including a main table with a header (marked 2 on the picture) and several data tables for the user (marked 1 on the picture). To style these specific data tables, I've added some custom CSS: . ...

Interactive jQuery Dropdown Menu with Multiple Divs

I have been working on this and I'm almost there, but the jQuery part is driving me crazy (I'm not very proficient in it yet, but I am learning). Here's the link to the fiddle: http://jsfiddle.net/5CRA5/4/ Since I can't demonstrate th ...

Display everything when an option is clicked

I have a filter that is working perfectly. When I select a specific category, it filters out only rows with that category. However, I am stuck on how to display all rows again after clicking on the first option. My objective is to show all rows when "Categ ...

Is it possible to eliminate a style that was applied using the .css() method?

Currently, I am using jQuery to modify the CSS and would like to know how to remove the styling that is being applied based on the input value provided: If the color is not '000000', then change the background-color of the body element to the sp ...

Displaying an image on a jsp page

In my current JSP, within the HTML section, I have the following: <select> <%if(size == 1)%> <option>None selected</option> <%if(size > 1)%> <option>1</option> </select> Additionally, I have this ima ...

unable to obtain desired font in the final result

I have encountered an issue where the certificate theme I am storing in the database as HTML appears fine in the browser output, but when fetched and displayed in a PDF format, the normal font output is shown instead. I am unsure of what I might be doing w ...

Converting HTML content into a single string simplifies data manipulation and extraction

exampleHTML=" This is sample HTML code that needs to be converted into a string using JavaScript

" I am looking to transform it into a single string format like str="This is sample HTML code, that needs to be converted into a string, usin ...

After the submit button is disabled, the form fails to be submitted

Hello, I am having an issue with disabling my button after the form is submitted. The button gets disabled, but the PHP code does not execute. I have tried various scripts from the internet, but they all seem to have the same result: the button gets disab ...

mobile-responsive vertical alignment using Bootstrap

Here is a jsbin that demonstrates the issue and here is the markup: <div class="row"> <div class="col-sm-4 xs-12"> <strong>UK Postcode</strong> </div> <div class="col-sm-4 xs-12"> <strong>Other Fie ...

Utilizing the CSS property "overflow:hidden;" to control the content visibility within nested div elements

Within a parent div, I have 6 nested divs with no border-radius set. The parent div has a border-radius applied, causing the corners of the child divs to spill over the rounded corners of the parent. Even setting overflow to hidden does not seem to solve t ...

The most effective method for incorporating a header and footer into an HTML page utilizing a variety of client-side frameworks

Looking for a solution for my HTML project where I want to incorporate a header and footer to minimize rework. Any suggestions on a good approach? I have experimented with AngularJS using ng-include, and here is the code snippet: var app = angular.module ...

Tips for choosing a sibling element on hover using CSS

I'm having trouble figuring out how to make the rect element change color to purple when the text is highlighted. Right now, only the text color is changing. Is there a way to achieve this using just CSS? The goal is for the rect to turn purple on ho ...

Displaying or concealing HTML elements using AngularJS while a modal is open

Looking for a way to display a loading spinner icon on my page when a user triggers a button that opens a modal, and then have the spinner disappear once the modal is open and its content has loaded. Currently, I've managed to make the spinner show up ...

Selenium's get_attribute method is not providing a value

Below is the code I am currently working with: url="https://www.betexplorer.com/soccer/poland/ekstraklasa/lks-lodz-lechia-gdansk/fgQY4hAD/" browser = webdriver.Chrome() browser.get(url) time.sleep(1.5) trs = browser.find_elements_by_xpath(".//div[@id=&a ...

Access WordNet using JavaScript

Currently developing a web application that involves NLP tasks. In my past projects, I have used the JWNL library in Java which has always served me well. I am curious to know if you have any advice on the most effective approach for querying the WordNet ...