User Agent Style overwriting my CSS

210
March 25, 2018, at 11:02 PM

I've tried various solutions found here on Stack Overflow with no luck.

I'm trying to set a div to display: none on screens over 768px wide using media query but user agent styling is overwriting my code.

My code:

@media (min-width: 768px) { 
    .elementToBeHidden {
         display: none!important;
    }
}

Solutions already tried with no luck:

  1. Checking the doctype has been declared correctly - it has.
  2. Implementing a CSS reset.
  3. Using !important (as you can see from my code)
  4. Checking my CSS file is being called properly - it is.

With all of these solutions the User Agent Styling continues to stubbornly overwrite my code. I've also tested the same code outside a media query in the general CSS with the same affect. My CSS is crossed out and overridden by the User Agent.

I'm using custom CSS in conjunction with Bootstrap v 4.0 but I can't see any indication that it's Bootstrap that is causing the problem, and in any case, !important has always worked to overwrite Bootstrap in the past.

Rent Charter Buses Company
READ ALSO
Primeng turbo table cell data overlapping other cells

Primeng turbo table cell data overlapping other cells

How do I prevent primeng turbo table cell data from overlapping other cells, I tried to add - [style]=" {'overflow':'hidden' }" to : <tr> , <td> and <div>, and none of these elements solved the overlappinganyone have an idea how to solve that?

463
how to actually fill in .css sheet and index page to code images to different sizes not just the size my .css &ldquo;img&rdquo; says

how to actually fill in .css sheet and index page to code images to different sizes not just the size my .css “img” says

I know this question has been asked before, but I dont understand how to add my class to css or why my image doesn't do what it is supposed to, I need to make images different sizes, so in mycss file I have a certain size for img, I have read that I can add classes...

169
how to create a temporary table spring data for each request

how to create a temporary table spring data for each request

I have to create in my backend a temporary table with some data for each request that I receive

177
Database design for a website that allows for desks to be booked in an office

Database design for a website that allows for desks to be booked in an office

In the office in question, there are several floors and users can book multiple times for a desk for different datesIf a desk is booked, it should appear in the result list

158