-webkit-gradient in table causes border lines in Android - android

I have a table in a webview that I use in an android app.
The problem is that "background-image:-webkit-gradient(linear, left top, left bottom, from(#3F3F3F), to(#202020));" causes a white line in between the <td>s of that table. Border-collapse or border:none only works without the gradient.
The lines does not appear on all android devices (appears on Galaxy S2, zte blade for example) and does not appear in chrome or iphone. Result is the same without just background:-webkit... but with black lines instead.
Any suggestions?
css:
.sporttable tr:nth-child(1)
{
background-image:-webkit-gradient(linear, left top, left bottom, from(#3F3F3F), to(#202020));
background-size: auto;
color: #fff;
font-weight: bold;
}

I solved this using a gradient background image behind the css, this will make the lines almost non visible on the effected devices. Advantages against just using an image background is that the css scales much better and the gradient is much smoother. Far from a perfect solution, but it works.

Related

css to stretch full screen static background, works OK everywhere except android chrome?

The easiest and most compatible way I know to stretch a static background image and cover the entire screen is:
html { min-height: 100%; }
body
{
background: url('https://i.imgur.com/YSRXO72.jpg') no-repeat center fixed;
background-size: cover;
}
The html { min-height: 100%; } is just in case there is only little content in the html body, this makes sure the background is still stretched over the entire screen.
This works perfectly fine in almost any situation, however if there is more content in the page than fits on the screen, Chrome on Android seems to stretch the background image to cover the entire page rather than the screen.
Live example: https://jsfiddle.net/7cnuytk2/
(note that I also put the -webkit -moz and -o background size settings there for compatibility, but it also works without)
I deliberately took a test background image here with N/E/S/W markers, you should always see 'center' in the center and either the top+bottom or left+right edges.
The background is properly stretched in all cases, except Chrome on Android which stretches it too much. If there is less content in the html part, e.g. just one <h1>test</h1> or something, it works fine on Chrome as well.
Any ideas? Is this a bug in Chrome? Can I work around this without falling back to all sorts of dirty javascript hackery?

Hairline borders between my tables in Gmail Android App

I have been trying to find the issue for this for awhile now and I can't figure out why these thin hairline borders are appearing in Gmail Only. I have tried to set bgcolors on all the TD elements, even all my tables are border:collapse (see code below). Any help would be much appreciated. You can see these on the edges. It looks like a thin border slicing through the email horizontally.
The image is here as I can't post images just yet.
http://imgur.com/Q7IfLnt
table {
border-collapse:collapse !important;
border-spacing: 0 !important;
Margin: 0 auto;
}
Have you inlined the css just to be sure
also put the border collapse on TDs too

CSS border-image with transparent image shows an edge on Android

This page http://wildlife.x-tremeteam.com utilizes the CSS border-image property and a .png image with a transparent edge to create a "torn paper" look on my divs. It works great except on my Android (Samsung SIII), whether I'm using its default browser or the Chrome app. On that I can see a slight edge on the inside and outside of the 20px border. Interestingly, I do not see the edge on the corners. The background of the div with the border is transparent. I only apply a background color to the div inside that.
Browsers on my desktop, the iPhone I use for testing and all renderings on responsinator.com don't show the edge of the image.
It must have something to do with the div's background-color property because if I set that to RED, the edges do turn red. However, making this property transparent won't remove it.
CSS is as follows, which also includes a default div property which did not help:
div {border: 0; border-style: none; }
.BoxGrunge {
border-color: #7777777; /* this won't really be seen */
border-style: double;/* this won't really be seen */
border-width: 20px 20px 20px 20px;
-webkit-border-image: url(images/RippedEdgeWhiteTrans.png) 20 20 20 20 repeat;
-moz-border-image: url(images/RippedEdgeWhiteTrans.png) 20 20 20 20 repeat;
border-image: url(images/RippedEdgeWhiteTrans.png) 20 20 20 20 repeat;
background-color: transparent; /* otherwise there is a white edge on Android */ /*THIS DOESN'T HELP */
display: block !important;
margin: 0 0 5px 0;
}
Thanks, I have been staring at this for hours and can't figure it out.
I finally found it myself. Mostly.
It was the REPEAT value of the border-image properties.
After much testing with images and divs of different colors, I realized that all four sides (not the corners) were being slightly repeated in the other/wrong direction as well. So when my image was an orange box that was transparent at the outside edges, a tiny sliver of orange was being repeated on the outside edge. It did not happen on iPhone 6, just Android and possibly older iPhones.
In other words, for the top, the image was being repeated horizontally as needed. But it also repeated vertically just a little bit.
I am guessing this is some sort of Android bug.
I fixed it by using STRETCH instead for smaller media queries.
I don't like it but that's what worked.

Is it possible to set image for the "over scrolled" (bounced) area of a web page (for mobile)?

Most mobile browser will have a default behavior to allow the users to continue scrolling when they reach the top or bottom of a page, leaving a white space on the top or bottom of the page. And then the whole page will bounce back to fill the white space. In native iOS applications, we can easily set images and even interactive elements for these top and bottom areas. I wonder if this can be done for pure web applications.
What I tried is to set background image of html,body, for example:
html, body {
background: url(../img/topnotification.jpg) no-repeat top center;
background-size: contain;
}
Unfortunately this didn't work because it seems the enter body was being over scrolled. I wonder if there is a special property we can set for the top and bottom empty over scroll areas for mobile websites.
I also have tried:
html:before, body:before {
width: 100%;
height: 100%;
top: -100%;
position: absolute;
background: url(../img/topnotification.jpg) no-repeat top center;
background-size: contain;
overflow: visible;
}
This apparently didn't work either.
I believe that this depends solely on the browser as I do not know of any html elements that specify white spaces resulting from over scrolling.
Personally I never experienced any thing like this in windows, chrome, and android.
You might be able to create an animation that happens when the scrolling reaches the bottom or the footer of the page, but I do not think anything can be done to fill in the white space. It is mostly likely browser based.

Margin: 0 auto on mobiles always sets margin background-color to element background-color

It's hard to formulate a brief title. What happens is that the background-color of the centered div extends to the left and right edges of the screen and the background-color of the body is ignored or overridden.
I'm using the twentythirteen theme for this document.
It sets a width smaller than the full width and uses margin:0 auto to center the content divs.
In a standard native web view component in our app on Iphone and Android, the automatic margin (left and right) does not become the background-color of the body, but white. Between elements in the content div the correct background-color shows through their margins.
Also, Chrome on Android shows the same white margins.
Have both leading OS developers decided that their respective -kits should do this, or what is going on? Note that the CSS validator throws up hundreds of errors - well, programming a proper theme from scratch is not in the budget for this project.
If you can link to a web page where this works, I could make the web view load that and check.
A background-color is set on several classes.
.entry-header, .entry-content, .entry-summary, .entry-meta {
background-color: #ffffff;
margin: 0 auto;
max-width: 604px;
width: 100%;
}
Delete the background-color and the issue will be fixed.

Categories

Resources