Ignore CSS Class on a specific page

Asked

Viewed 346 times

1

I have a system where the front was made with AngularJS. In that system I have the page index.html where I declare all the libraries, on that same page I have

o seguinte trecho de código:
<div id="wrapper">
         <hamburger-toggle state="stateModel" id="menu-toggle" href="#menu"></hamburger-toggle>
         <div ng-view></div>
</div> 

I have a div which has the CSS class wrapper, and within that div I have another one where I carry all my pages.

The problem is that my login page is loaded into this div with class wrapper, and this class defaults the entire page. I would like to ignore this class only on my login page.

I tried to do that:

#wrapper input:not(.ignoreCss) {...}

And at the beginning of the login page I did this:

 <div class="ignoreCss">
 ...

But it didn’t work. How to solve this problem?

  • What would that be input in your CSS ?

  • So, I didn’t understand either, it was an example that I found of how to ignore a css class in one part of the page: http://answall.com/questions/14639/ignorr-css-determinado-trecho-da-p%C3%A1gina

  • Dai tried to implement but nothing happened kk

  • You use Jquery?

  • I’m using Angular, I haven’t used any Jquery yet

1 answer

1


Using Your Example.

As you do this: #wrapper input:not(.ignoreCss) {...} you’re ignoring css only for inputs, not the full page. To eliminate from the full div, you could do this:

#wrapper :not(.ignoreCss) {
    background: black;
    border : 1px solid;
    color: #fff;
}
<div id=wrapper>
  <div>a</div>
  <div>s</div>
  <div class=ignoreCss>f</div> <!-- Esse não vai ser preto -->
  <div>d</div>
</div>

So you’re not just limiting yourself to inputs.

In this code, you’re saying that the div who owns the class ignoreCss, will not have set properties for id #wrapper.

Jsfiddle.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.