I want to do the styling of scroll bar. It's working in chrome but it isn't working in Firefox. How do I solve this?
As you will have found the code for custom scrollbars is ::-webkit-scrollbar using the webkit system
Unfortunately not all browsers support webkit, you'll find Webkit works on browsers such as Chrome & Safari but Firefox uses -moz and I.E. uses -ms. Because of this, scrollbar design will work on webkit browsers only. There is no -moz or -ms equivalent.
You can read more on the Mozilla Developer pages about scrollbar design
Related
I have finished designing my website but it displays differently on firefox, chrome and internet explorer. I believe i have done everything right but i dont know what is happening. Actually, google chrome displays it as i want it to, but firefox and internet explorer does not. My internet explorer version is 10 and firefox is 29. Please any help is much appreciated. thanks
This is the link to hosted site: http://www.ruebenpersonal.netai.net.
http://pastebin.com/xTnXeGhq - Link to the html source code.
Some browsers are uses the same rendering engine and some are not.
For example:
Google Chrome and Safari browsers are using : Webkit Engine (See: http://www.webkit.org/)
Firefox is using Gecko Engine (A.K.A. Moz) - (See: http://en.wikipedia.org/wiki/Gecko_(software)
Opera is using : Presto (See: http://www.opera.com/docs/specs/productspecs/)
So differences between rendering engines are normal. Which is why we are using their css properties like;
-webkit-border-radius /* For Webkit */
-moz-border-radius /* For Gecko */
-o-border-radius /* For Presto */
border-radius /* For IE9+ */
Some older browsers like Internet Explorer 6, 7, 8 are not giving support for most of CSS3 methods. To enable that methods, there are available to use JS engines like html5shiv or modernizr.
Note: You can use a service like this to generate starter templates that supports almost every browser.
Initializr: http://www.initializr.com/
Each browser uses different rendering engines. This means that certain HTML elements, CSS styles, etc. will be interpreted differently or not at all by browsers that do not share the same rendering engine.
To understand more, I would refer to this link: http://taligarsiel.com/Projects/howbrowserswork1.htm
As far as developing for multiple browsers, I would look into the modernizr javascript library, http://modernizr.com/, and for quick reference, caniuse.com.
Hope this is helpful.
The Browser Safari falls under Webkit or not? Please do clarify my doubt at the earliest. If it is not falls under the category of Webkit, what steps would I take to write in CSS. I mean the syntax of CSS for Safari Browser Like -moz for Filezilla and -webkit for Chrome?
Safari is webkit based. In fact safari was the first browser to use webkit and the open source it. The -webkit should work.
You can read more here:
http://en.wikipedia.org/wiki/Safari_(web_browser)
http://www.webkit.org/
I am doing some videos from Microsoft Virtual Academy and stumbled upon -ms-flex or so called Flexbox in css3.
I would like to implement a web app on html5 and css3 and this -ms-flex would help me very much.
Is this available in webkit or fennec based browsers on mobile devices?
If this can be used, are there any limitations of use?
Also are there any equivalent for those browser if that is not supported?
I found that : safari has webkit-box and maybe there are others for the rest of the browsers(Opera, Chrome and Mozilla or Dolphin)
Alright, extending from comment:
According to can_i_use, You can use flex box on many modern browsers with proper prefix:
WebKit browsers (Chrome, Safari, Android stocked browser, Chrome for Android, iOS Safari) with -webkit- prefix;
Gecko/Fennec browsers (Firefox, Firefox for Android) with -moz- prefix;
Trident browsers (IE 10) with -ms- prefix;
Presto browsers (Opera desktop) without prefix.
You should be able to find some tutorial/example on MDN, or (as usual) Google.
I have a ul and I want to fix the width of the ul to content. Currently I use -moz-max-content but there is some problem in non-mozilla browsers.
How can I implement the -moz-max-content?
Use max-width: intrinsic;. This works for webkit browsers (Chrome & Safari).
Be aware that attributes starting with -moz are only working in Mozillas Firefox. The common prefixes are:
-moz for Firefox
-webkit for Webkit (mainly Chrome & Safari and a lot of the Chromium forks)
-ms for IE10
-o for Opera
As written at http://msdn.microsoft.com/library/ms530811.aspx you can only define pixels or percentage. The max-width property itself is supported since IE7.
It might be that you can use a max-width: 100%; for IE, but I'm unsure if the results are the same.
I'm working on some boxes where I'm forced to using the following css on a div in order to make it look right:
display:table;
It works fine in Firefox + Internet Explorer, but I just noticed that it adds a 1px border/margin/padding in webkit browsers (Safari / Chrome), which moves the box a bit... How can I get rid of this?
I've uploaded a picture example of how it's rendered:
http://imageshack.us/photo/my-images/854/examplez.jpg/
Is there a "simple way" of determining in the stylesheet whether you are using a webkit browser or not? Because then I could just add a "margin-left:-1px".. I know there is a way of determining the browsertype in jQuery, but I think it's kind of overkill for this..