Solved

Css: width for different browsers

Posted on 2016-09-09
5
27 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
I used one of the hacks in the link above and that worked for firefox. Thanks.
0
 
LVL 7

Expert Comment

by:Jason
Comment Utility
np!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
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 tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

771 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now