PDA

View Full Version : [CLOSED] Problem with CSS rules in a grid.



feanor91
Jan 08, 2013, 10:07 AM
Hello

Another curious problem look at this screen:

5390

As you could see, the cell are not alligned vertically, meanwhile, I have defined vertical-align in my css file.

On another computer, cells are corectly centered (it's another grid, but CSS is excatly the same):

5391

So what's wrong?

Daniil
Jan 08, 2013, 12:05 PM
Hi @feanor91,

Does "another computer" mean another browser?

I just assume it is a cross-browser issue.

feanor91
Jan 08, 2013, 12:12 PM
Hum...Chrome on both

Daniil
Jan 08, 2013, 12:21 PM
OK.

It is hard to say anything concrete without a sample to reproduce. Could you provide?

feanor91
Jan 08, 2013, 12:47 PM
I'm not even sure you can reproduce, I think it is localy related, I post just if someone have any idea of what can be wrong.

In the same time, I have only change this CSS rules from grid custom exemple:


.x-grid-custom .x-grid-row TD {
font : 16px/28px "segoe ui",arial,sans-serif;
height : 30px;
vertical-align: middle !important;
}

Daniil
Jan 08, 2013, 12:49 PM
Maybe, a problem in the Columns' Renderers.

feanor91
Jan 08, 2013, 12:52 PM
Maybe, a problem in the Columns' Renderers.

Here the renderer:



var renderColorETTRTable = function (value, metadata, record, a, col, c, d)
{
var screenWidth=screen.availWidth;
//screenWidth = 1920;
if (screenWidth > 1280)
var template = '<span style="font-size:20px">{0}</span>';
else
var template = '<span style="font-size:12px">{0}</span>';
if (record.data.BOOL_Warranty)
{
if (col == 1)
{
metadata.tdCls = "warranty-cell";
}
else
{
if (record.data.BOOL_Investigation)
{
metadata.tdCls = "investigation-row";
}
}
}
else
{
if (record.data.BOOL_Investigation)
{
metadata.tdCls = "investigation-row";
}
}
return Ext.String.format(template, value);
}



Perhaps, putting align parameter in style?

Daniil
Jan 08, 2013, 3:22 PM
Yes, I would try to apply the vertical-align rule for the span element.

feanor91
Jan 08, 2013, 5:30 PM
OK, I will try tomorrow and repport. Will have to remove information from CSS?

Daniil
Jan 09, 2013, 5:23 AM
Will have to remove information from CSS?

Do you mean the "vertical-align" rule? Not sure, but I would try to remove.

feanor91
Jan 09, 2013, 9:06 AM
Done test, but it is not better, I reduce size of police too so numbers are not too stick on the upper part.

Well nether mind, perhaps I will have some illumination one day.

Daniil
Jan 09, 2013, 11:12 AM
OK.

If you provide us with a test case to reproduce, we would be happy to investigate.

feanor91
Jan 09, 2013, 11:53 AM
Yes, I know, thanks, but as I said, I don't even know if it is reproductible, when I have some time, I will try.