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
Solved

Css: width for different browsers

Posted on 2016-09-09
5
59 Views
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?
0
Comment
Question by:renisenbb
  • 3
  • 2
5 Comments
 
LVL 7

Accepted Solution

by:
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
0
 

Author Comment

by:renisenbb
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.
0
 

Author Comment

by:renisenbb
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.
0
 

Author Comment

by:renisenbb
ID: 41792167
I used one of the hacks in the link above and that worked for firefox. Thanks.
0
 
LVL 7

Expert Comment

by:Jason
ID: 41792168
np!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

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…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

856 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