Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Overriding webkit- user agent styles
Message
From
28/04/2014 02:49:53
 
General information
Forum:
CSS
Category:
Styling
Miscellaneous
Thread ID:
01599142
Message ID:
01599155
Views:
30
>>>How do you override the style defined in the Chrome “user agent stylesheet”?
>>>
>>>For example, I have a UL element on a page that in the Chrome Development Tools shows properties as in “user agent stylesheet”. This UL is shown as sized to be 608 by 63px which is not enough (width) to show all LI elements in one line. So the last LI element breaks into the next line. (IE 10 does not have this problem).
>>>
>>>I am trying figure how to override this webkit engine behavior (the same problem occurs on iPad browser).
>>>I am guessing that the problem rests with the “user agent stylesheet” but if you see that I can be resolved in another way, please let me know.
>>
>>The 'user agent stylesheet' settings are just the styles built into the browser - a default if you provide nothing else. It's common practice to completely override these so that you start with a clean slate for all browsers. Plenty of examples around - first one I found : http://meyerweb.com/eric/tools/css/reset/
>>
>>Simply make sure this is the first stylesheet loaded then build your own requirements on top of that. I thought that if you use Bootstrap it pretty much did this anyway?
>
>First, thank you for the link; I will follow it. Yes, I do use Bootstrap 3 but webkit overrides some properties from 'user agent stylesheet'

Everything overrides user agent settings - it's at the bottom of the heap. The main point is that it's best to override *everything* that might be defined in user agent settings - otherwise you'll always potentially get variations between browsers.

.> I have seen some messages in Stackoverflow regarding this issue. As I mentioned in my update that I set the inline style to "my" value of width and the problem is resolved. What confused me is that I didn't see in the 'user agent stylesheet' the value for "width" property.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform