My media queries gets overwritten by normal css code [duplicate]












-1
















This question already has an answer here:




  • how to overwrite css style

    6 answers




P.S: I'm using React for front-end and SASS for CSS that's why it's 'className' instead of 'class' and there are no brackets in my CSS.



It's not much to explain, basically whenever I try to for example show the burger menu on the table view, it never appears and stays display: none.



.logo__area-mobile
display: none


@media only screen and (max-width: 768px)
.logo__area-mobile
display: block


HTML:



<header>
<div className="header-search">
<div className="logo__area-mobile">
<button>☰</button>
</div>
<div className="header-search-input">
<i className="fas fa-search"></i>
<input type="text" placeholder="Est: Daredevil, Orange is the new black" />
</div>
</div>
<div className="header-menu">
<div className="menu">
<ul>
<li><NavLink to="/recently" activeClassName="is-active">مضاف مؤخراً</NavLink></li>
<li><NavLink to="/series" activeClassName="is-active">المسلسلات</NavLink></li>
<li><NavLink to="/movies" activeClassName="is-active">الافلام</NavLink></li>
<li><NavLink to="/" activeClassName="is-active" exact>الرئيسية</NavLink></li>
</ul>
</div>
<div className="logo">
<Link to="/">EgyMovs</Link>
</div>
</div>
</header>









share|improve this question















marked as duplicate by Community Nov 20 '18 at 21:11


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
















  • What's your HTML?

    – jeanpaulxiao
    Nov 20 '18 at 19:42











  • Hey @jeanpaulxiao just edited it, you can see the HTML now. :)

    – Laylaz
    Nov 20 '18 at 19:58






  • 1





    ^^ and the html should be "class=" not "className="

    – circusdei
    Nov 20 '18 at 20:02






  • 1





    hey @disinfor sorry for not making this clear already, I'm using SASS for my CSS and React for my front-end so all my classes in HTML are called 'className' :)

    – Laylaz
    Nov 20 '18 at 20:03






  • 2





    In that case, can you post the compiled output?

    – circusdei
    Nov 20 '18 at 20:07
















-1
















This question already has an answer here:




  • how to overwrite css style

    6 answers




P.S: I'm using React for front-end and SASS for CSS that's why it's 'className' instead of 'class' and there are no brackets in my CSS.



It's not much to explain, basically whenever I try to for example show the burger menu on the table view, it never appears and stays display: none.



.logo__area-mobile
display: none


@media only screen and (max-width: 768px)
.logo__area-mobile
display: block


HTML:



<header>
<div className="header-search">
<div className="logo__area-mobile">
<button>☰</button>
</div>
<div className="header-search-input">
<i className="fas fa-search"></i>
<input type="text" placeholder="Est: Daredevil, Orange is the new black" />
</div>
</div>
<div className="header-menu">
<div className="menu">
<ul>
<li><NavLink to="/recently" activeClassName="is-active">مضاف مؤخراً</NavLink></li>
<li><NavLink to="/series" activeClassName="is-active">المسلسلات</NavLink></li>
<li><NavLink to="/movies" activeClassName="is-active">الافلام</NavLink></li>
<li><NavLink to="/" activeClassName="is-active" exact>الرئيسية</NavLink></li>
</ul>
</div>
<div className="logo">
<Link to="/">EgyMovs</Link>
</div>
</div>
</header>









share|improve this question















marked as duplicate by Community Nov 20 '18 at 21:11


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
















  • What's your HTML?

    – jeanpaulxiao
    Nov 20 '18 at 19:42











  • Hey @jeanpaulxiao just edited it, you can see the HTML now. :)

    – Laylaz
    Nov 20 '18 at 19:58






  • 1





    ^^ and the html should be "class=" not "className="

    – circusdei
    Nov 20 '18 at 20:02






  • 1





    hey @disinfor sorry for not making this clear already, I'm using SASS for my CSS and React for my front-end so all my classes in HTML are called 'className' :)

    – Laylaz
    Nov 20 '18 at 20:03






  • 2





    In that case, can you post the compiled output?

    – circusdei
    Nov 20 '18 at 20:07














-1












-1








-1









This question already has an answer here:




  • how to overwrite css style

    6 answers




P.S: I'm using React for front-end and SASS for CSS that's why it's 'className' instead of 'class' and there are no brackets in my CSS.



It's not much to explain, basically whenever I try to for example show the burger menu on the table view, it never appears and stays display: none.



.logo__area-mobile
display: none


@media only screen and (max-width: 768px)
.logo__area-mobile
display: block


HTML:



<header>
<div className="header-search">
<div className="logo__area-mobile">
<button>☰</button>
</div>
<div className="header-search-input">
<i className="fas fa-search"></i>
<input type="text" placeholder="Est: Daredevil, Orange is the new black" />
</div>
</div>
<div className="header-menu">
<div className="menu">
<ul>
<li><NavLink to="/recently" activeClassName="is-active">مضاف مؤخراً</NavLink></li>
<li><NavLink to="/series" activeClassName="is-active">المسلسلات</NavLink></li>
<li><NavLink to="/movies" activeClassName="is-active">الافلام</NavLink></li>
<li><NavLink to="/" activeClassName="is-active" exact>الرئيسية</NavLink></li>
</ul>
</div>
<div className="logo">
<Link to="/">EgyMovs</Link>
</div>
</div>
</header>









share|improve this question

















This question already has an answer here:




  • how to overwrite css style

    6 answers




P.S: I'm using React for front-end and SASS for CSS that's why it's 'className' instead of 'class' and there are no brackets in my CSS.



It's not much to explain, basically whenever I try to for example show the burger menu on the table view, it never appears and stays display: none.



.logo__area-mobile
display: none


@media only screen and (max-width: 768px)
.logo__area-mobile
display: block


HTML:



<header>
<div className="header-search">
<div className="logo__area-mobile">
<button>☰</button>
</div>
<div className="header-search-input">
<i className="fas fa-search"></i>
<input type="text" placeholder="Est: Daredevil, Orange is the new black" />
</div>
</div>
<div className="header-menu">
<div className="menu">
<ul>
<li><NavLink to="/recently" activeClassName="is-active">مضاف مؤخراً</NavLink></li>
<li><NavLink to="/series" activeClassName="is-active">المسلسلات</NavLink></li>
<li><NavLink to="/movies" activeClassName="is-active">الافلام</NavLink></li>
<li><NavLink to="/" activeClassName="is-active" exact>الرئيسية</NavLink></li>
</ul>
</div>
<div className="logo">
<Link to="/">EgyMovs</Link>
</div>
</div>
</header>




This question already has an answer here:




  • how to overwrite css style

    6 answers








css sass media-queries






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 20 '18 at 20:04







Laylaz

















asked Nov 20 '18 at 19:25









LaylazLaylaz

125




125




marked as duplicate by Community Nov 20 '18 at 21:11


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Community Nov 20 '18 at 21:11


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • What's your HTML?

    – jeanpaulxiao
    Nov 20 '18 at 19:42











  • Hey @jeanpaulxiao just edited it, you can see the HTML now. :)

    – Laylaz
    Nov 20 '18 at 19:58






  • 1





    ^^ and the html should be "class=" not "className="

    – circusdei
    Nov 20 '18 at 20:02






  • 1





    hey @disinfor sorry for not making this clear already, I'm using SASS for my CSS and React for my front-end so all my classes in HTML are called 'className' :)

    – Laylaz
    Nov 20 '18 at 20:03






  • 2





    In that case, can you post the compiled output?

    – circusdei
    Nov 20 '18 at 20:07



















  • What's your HTML?

    – jeanpaulxiao
    Nov 20 '18 at 19:42











  • Hey @jeanpaulxiao just edited it, you can see the HTML now. :)

    – Laylaz
    Nov 20 '18 at 19:58






  • 1





    ^^ and the html should be "class=" not "className="

    – circusdei
    Nov 20 '18 at 20:02






  • 1





    hey @disinfor sorry for not making this clear already, I'm using SASS for my CSS and React for my front-end so all my classes in HTML are called 'className' :)

    – Laylaz
    Nov 20 '18 at 20:03






  • 2





    In that case, can you post the compiled output?

    – circusdei
    Nov 20 '18 at 20:07

















What's your HTML?

– jeanpaulxiao
Nov 20 '18 at 19:42





What's your HTML?

– jeanpaulxiao
Nov 20 '18 at 19:42













Hey @jeanpaulxiao just edited it, you can see the HTML now. :)

– Laylaz
Nov 20 '18 at 19:58





Hey @jeanpaulxiao just edited it, you can see the HTML now. :)

– Laylaz
Nov 20 '18 at 19:58




1




1





^^ and the html should be "class=" not "className="

– circusdei
Nov 20 '18 at 20:02





^^ and the html should be "class=" not "className="

– circusdei
Nov 20 '18 at 20:02




1




1





hey @disinfor sorry for not making this clear already, I'm using SASS for my CSS and React for my front-end so all my classes in HTML are called 'className' :)

– Laylaz
Nov 20 '18 at 20:03





hey @disinfor sorry for not making this clear already, I'm using SASS for my CSS and React for my front-end so all my classes in HTML are called 'className' :)

– Laylaz
Nov 20 '18 at 20:03




2




2





In that case, can you post the compiled output?

– circusdei
Nov 20 '18 at 20:07





In that case, can you post the compiled output?

– circusdei
Nov 20 '18 at 20:07












1 Answer
1






active

oldest

votes


















0














Use more specific selector for your element.
Like 2 classes or tag name and class name.



Hint for count:



enter image description here



.a .b //00020
#id .a //00110 -- more specific, higher priority





share|improve this answer






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Use more specific selector for your element.
    Like 2 classes or tag name and class name.



    Hint for count:



    enter image description here



    .a .b //00020
    #id .a //00110 -- more specific, higher priority





    share|improve this answer




























      0














      Use more specific selector for your element.
      Like 2 classes or tag name and class name.



      Hint for count:



      enter image description here



      .a .b //00020
      #id .a //00110 -- more specific, higher priority





      share|improve this answer


























        0












        0








        0







        Use more specific selector for your element.
        Like 2 classes or tag name and class name.



        Hint for count:



        enter image description here



        .a .b //00020
        #id .a //00110 -- more specific, higher priority





        share|improve this answer













        Use more specific selector for your element.
        Like 2 classes or tag name and class name.



        Hint for count:



        enter image description here



        .a .b //00020
        #id .a //00110 -- more specific, higher priority






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 20 '18 at 20:19









        FoxFox

        3961419




        3961419















            Popular posts from this blog

            "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

            Alcedinidae

            Origin of the phrase “under your belt”?