Miguel Carrillo
Posts: 0
Joined: Mon Sep 29, 2014 7:46 pm

Problems with css background

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.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Problems with css background

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

Miguel Carrillo
Posts: 0
Joined: Mon Sep 29, 2014 7:46 pm

Problems with css background

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...

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Problems with css background

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.

Return to “Issues”