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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

756 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