Page 1 of 1

Problems with css background

Posted: Thu Oct 16, 2014 5:51 pm
by Miguel Carrillo

I'm trying to use this background image in the mobilegrid : http://gyazo.com/c1b03d67006ae4581e91... but when i use the code

Apperyio("grid1").css({
"background-image": "url(" + Apperyio.getImagePath("fondo_grid.png") + ")",

});

it looks like this:

http://gyazo.com/6df2a2f717fa0340b4e4...

So i need to adjust it in auto to the grid size so the background image could simulate a square for each user.


Problems with css background

Posted: Thu Oct 16, 2014 6:44 pm
by Evgene Karachevtsev

Hello Miguel,

Try to use not one picture with three backgrounds, and for each gridcell its own background.
For example like this
pre$("[name='grid_1'] td").css({
"background-image": "url(" + Apperyio.getImagePath("font.png") + ")",
});/pre

where font.png is the background as in the screenshot

Image


Problems with css background

Posted: Thu Oct 16, 2014 8:12 pm
by Miguel Carrillo

The problem is that I have 1 grid with 6 colums, for that i need 2 colums for each background.

Heres how it's build.

http://gyazo.com/d1c933bdb0495901bdca...


Problems with css background

Posted: Fri Oct 17, 2014 2:44 am
by Yurii Orishchuk

Hi Miguel,

Please use this code:

pre

//Note: "mobilegrid_197" is your grid component name.
$("[name='mobilegrid_197'] td").css({
"background-image": "url(https://d2r1vs3d9006ap.cloudfront.net/s3_images/1109618/bVSulrl_inline.png?1413485051)",
"background-size": "100% 100%",
"padding": "30px"
});

/pre

Also you should use your "image url" and adjust padding for table cells.

Regards.