How to disable CSS in Browser for testing purposes
Is there any way I can disable all external CSS in a browser (Firefox, Chrome...)?
When using slower internet connection, sometimes only the bare HTML is loaded by the browser without the CSS info. It looks like the page has been laid raw on the screen. You would have noticed this with StackOverflow too.
I want to make sure that my web page shows up OK even if the CSS files are not loaded.
I didn't mean I want to convert external CSS to inline. But I want a way to explicitly disable all CSS from the browser so that I can reposition my elements in a better, readable way.
I know I can remove the <link rel='stylesheet'> entries, but what if I have a lot of linked pages?
In Chrome/Chromium you can do this in the developer console.
- Bring up the developer console by either ctrl-shift-j or Menu->Tools->Developer Console.
- Within the developer console browse to the Sources tab.
- In the top-left corner of this tab is an icon with a disclosure triangle. Click on it.
- Browse to <domain>→css→<css file you want to eliminate>
- Highlight all of the text and hit delete.
- Rinse and repeat for each stylesheet you want to disable.
The Web Developer plugin for Firefox and Chrome is able to do this
Once you have installed the plugin the option is available in the CSS menu. For example, CSS > Disable Styles > Disable All Styles
Alternatively with the developer toolbar enabled you can press Alt+Shift+A
.
Firefox (Win and Mac)
- Via the menu toolbar, choose: "View" > "Page Style" > "No Style"
- Via the Web Developer Toolbar, choose: "CSS" > "Disable Styles" > "All Styles"
If the Web Dev Toolbar is installed, people can use this keyboard shortcuts: Command + Shift + S (Mac) and Control + Shift + S (Win)
- Safari (Mac): Via the menu toolbar, choose "Develop" > "Disable Styles"
- Opera (Win): Via the menu, choose "Page" > "Style" > "User Mode"
- Chrome (Win): Via the gear icon, choose the "CSS" tab > "Disable All Styles"
- Internet Explorer 8: Via the menu toolbar, choose "View" > "Style" > "No Style"
- Internet Explorer 7: via the IE Developer Toolbar menu: Disable > All CSS
- Internet Explorer 6: Via the Web Accessibility Toolbar, choose "CSS" > "Disable CSS"