Css: width for different browsers

Posted on 2016-09-09
Last Modified: 2016-09-09
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?
Question by:renisenbb
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Accepted Solution

Jason earned 500 total points
ID: 41792123
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

Author Comment

ID: 41792136
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.

Author Comment

ID: 41792144
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.

Author Comment

ID: 41792167
I used one of the hacks in the link above and that worked for firefox. Thanks.

Expert Comment

ID: 41792168

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question