Left border

43 views
Skip to first unread message

Angelo Miguel Nolasco

unread,
Jul 4, 2024, 10:58:26 PMJul 4
to DroidScript
Hi, im trying to make a simple game (html,js,css). When Im trying to run it, the left border/or left margin is not showing even if I will install the apk (build apk). But if I will paste the code in codepen, the 4 borders are there. What is reason of this? Thank.you

Tony G

unread,
Jul 5, 2024, 4:11:24 PMJul 5
to DroidScript
Try defining your layout as a width of .9 rather than 1.0, and make sure it's centered. It could be that the furthest left pixel is not shown for some device-specific reason.

"Border" and "Margin" (and "Padding") are different things, let's clarify the issue:
Generally, a border is a visible feature. Padding and margin are transparent/invisible. That is, the margin is empty space that gives the visible border some breathing room. This might just be a phrasing issue, but when you say "or left margin is not showing" ... yes, the left margin should not "show". However, you should see the empty space defined by the left margin. I'm guessing you already have a handle on that but I'm making this distinction just in case.

As to the border "showing" : Is your border color the same as your background? Or might it be obscured in some other way by a higher z-level object? Can you try to avoid the display of other controls just to test to see if this one is affected by others, or maybe display this one last and/or with a higher z-order?

This could be a funny face-palm situation too : Do you have a case around the device that could be hiding a single border pixel all the way around? Try removing your case.
See if your APK displays the border on another device.

If you want to see your box model, as a test, try the CSS here. See if any border/margin/padding space is not displayed correctly:


Hey, and it could be a bug somewhere: Please provide the relevant CSS here, your version of DS, and project type.
This might be more difficult but if the issue is with other controls then the issue might only be found by inspecting HTML or JS that generates the controls. I would discourage you from posting all of your code, and rather suggest that it's better to use a process of elimination to continue eliminating everything you can until you come up with a minimal case where the problem exists - or just before/after the problem somehow goes away.

I hope that helps. (HTH)

- Tony (aka CaptainStarbuck)
Reply all
Reply to author
Forward
0 new messages