Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging CSS layout glitches in Android

We have an existing web site, and I've been asked to test its compatibility with mobile browsers.

I've installed the Android SDK onto my desktop PC. I'm able to view my localhost site in the emulator, and I have identified a number of glitches in the page layout which occur in the Android browser.

But since none of these issues occur in any desktop browser, I've been struggling with how to debug them. For example, in Firefox, it's very easy to use Firebug to see what stylesheets have been appies and to adjust them on the fly to see how it affects the layout. But I haven't found a way to do anything similar on the Android emulator.

The question is, short of trial+error, how do I go about working out what is causing those layout issues? Does the Android browser (or the Android SDK) have any kind of tools that are useful for debugging CSS? If so, how do I use them?

[EDIT] I haven't found a solution to this, so I'm throwing open the doors to the bounty hunters...

like image 771
Spudley Avatar asked Jul 18 '11 09:07

Spudley


People also ask

How do you debug a CSS error?

When something has gone wrong in your CSS, you can begin by using your favorite browser's built-in DevTools to: toggle off rules one at a time. toggle all rules off and bring them back one at a time. remove or relocate elements.

How do I debug CSS styles?

While you can not "debug" CSS, because it is not a scripting language, you can utilize the Chrome DevTools Elements panel to inspect an element & view the Styles pane on the right. This will give you insights as to the styles being overridden or ignored (line threw).

How do I debug a CSS selector?

A fast way to debug our CSS selectors for a web page is through the Console of the browser's Developer Tools. To access developer tools in our browser, all we have to do is press F12. We can then navigate to the Console and use JQuery to debug our selector(s).


2 Answers

Weinre is probably the closest to what you're looking for:

If what you're looking for is something that allows you to tweak layout in realtime it should make you happy.

like image 91
mikerowehl Avatar answered Sep 20 '22 04:09

mikerowehl


https://chrome.google.com/webstore/detail/geelfhphabnejjhdalkjhgipohgpdnoc?hl=en-US

https://chrome.google.com/webstore/detail/cllkoedgiefnomcccogcalmjogjfcpji?hl=en-US

https://chrome.google.com/webstore/detail/cghdkdcepiflkhaddpomjehcmdojgobh?hl=en-US

I found several options that appear as though they should work for you if an emulator/simulator will suffice or at least get you started. The benefit to this is that the Chrome Developer Tools appear to work with the add-ons!

like image 45
Jared Avatar answered Sep 24 '22 04:09

Jared