1

What I need to do is: If the page size (not the screen size) is more than 2400px, then the table width is 50% else is 100%.

@media only screen and (min-width: 2300px) and (max-width: 2500) {
    .tblMemberInfo {
        width: 50%;
    }
}

I tried using the CSS above but it is not working.

Pingolin
  • 3,161
  • 6
  • 25
  • 40
toothless
  • 11
  • 3

2 Answers2

0

I believe what you to achieve is getting the browser width which can be done by using javascript or jquery

Check this answer from other stack overflow question that can help you solve your problem.

Browser width

0

You missed px at the end of your query. I am not sure this will fix it, but I have had problems because of this.

@media only screen and (min-width: 2300px) and (max-width: 2500px) {
    .tblMemberInfo {
        width: 50%;
    }
}

I don't know if there is a way to get screen size from the browser.

Daut
  • 2,537
  • 1
  • 19
  • 32