Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

Css: width for different browsers

I am using width:inherit for an extjs table for FF and IE.
Chrome doesn't work well with it and works with width:auto.
How do i get it to work for all browsers?
0
renisenbb
Asked:
renisenbb
  • 3
  • 2
1 Solution
 
JasonFreelance Computer TechnicianCommented:
Set it to a fixed size for all browsers...

.whatever {
width: 200px;
}

You can also set width to a percentage.
width: 20%;

Edit: There are hacks for different browsers to run different code but they are not valid CSS
0
 
renisenbbAuthor Commented:
I wanted to use inherit (ff and ie) and auto for chrome. I tried using
.myclass {
-webkit-column-width: auto;
width: inherit;
}
but that didn't work.
0
 
renisenbbAuthor Commented:
I also tried :
.myclass {
-webkit-column-width: auto;
-moz-column-width: inherit;
}
That worked for chrome but not ff. It seems i have to use width instead of column-width.
0
 
renisenbbAuthor Commented:
I used one of the hacks in the link above and that worked for firefox. Thanks.
0
 
JasonFreelance Computer TechnicianCommented:
np!
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now