Skip to main content
Participating Frequently
June 3, 2020
Question

making website responsive

  • June 3, 2020
  • 1 reply
  • 1053 views

Hi there,

 

I was trying to make responsive the webpage which I have developed in DW. But suddenly many divs turned red in css file. Please see the screenshot attached.

Any idea how to fix it?

Thanks

    This topic has been closed for replies.

    1 reply

    Nancy OShea
    Community Expert
    Community Expert
    June 3, 2020

    The red indicates invalid CSS code.   What you have posted in your screenshot looks like LESS or SASS code copied from somewhere.

     

     

    Valid CSS code syntax:

    .mainheadline {
    property: value;
    property: value;
    }
    
    

    CSS Tutorials - https://www.w3schools.com/css/

     

    Nancy O'Shea— Product User & Community Expert
    Participating Frequently
    June 4, 2020

    Thank you. Actually. I managed to turn all red into green. However, when I am trying to make them responsive, i.e. smartphone mode, the code does not make an effect.

    responsive code is like 

     

    @media screen and (max-width: 1000px) {
    .sandwwich {
    }
    }

     

    Hope it is correct? If yes, then why desktop mode version does not adjuct into mobile phone mode?

    Thanks

    Legend
    June 4, 2020

    Maybe you spelt 'sandwich' incorrectly:

     

    <p class="sandwich">I like sandwiches at anytime of the day, the more the better.</p>

     

    Desktop:

    .sandwich {

    color: red;

    }

     

    Mobile:

    @media screen and (max-width: 768px) {
    .sandwich {

    color: green;

    }
    }