Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
setting font-size in ui.jqgrid.css
11/06/2012
11:11
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hello Tony,

There are some common problem with the font size in case of usage jqGrid inside of other jQuery UI widget. The following

.ui-widget .ui-widget { font-size: 1em; }

CSS used in jQuery UI CSS ovewrites the CSS setting

.ui-jqgrid {position: relative; font-size:11px;}

used in ui.jqgrid.css.

My suggestion is to replace above line which set font-size for gbox to the following three lines

.ui-jqgrid .loading { font-size: 11px; }
.ui-jqgrid .ui-jqgrid-pager { font-size: 11px; }
.ui-jqgrid .ui-jqgrid-view { font-size: 11px; }

In the case the results will be the same as before, but the rule .ui-widget .ui-widget { font-size: 1em; } make no problems.

The setting of font-size for .ui-jqdialog already exist separately so one don't need to add it as the 4-th rule.

See demo example and some detailes in the answer.

Best regards
Oleg

11/06/2012
18:07
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello Oleg,

Thank you, but reading this:

http://filamentgroup.com/lab/u.....to_em_con/

and this

http://filamentgroup.com/lab/r....._archived/

I'm not sure that we shuld change the css this way Wink

Regardas

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

11/06/2012
18:12
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Sorry, Tony, but the links which you posted can't be read.

11/06/2012
18:25
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello Oleg,

Sorry.

Here we are

Link1

and

Link2

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

11/06/2012
18:47
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Tony,

I agree, that the usage of em instead of px would have many advantages. I am afrade that the changes can be not so simple. One have to change many height, margin and padding settings (but not all because in some situations icons with fixed pixel size are used).

My suggesting was about the first small step to improve CSS which uses jqGrid. jqGrid use not only own styles, but also jQuery UI CSS framework. So have have to take in consideration the standard jQuery UI CSS.

The line

.ui-jqgrid {position: relative; font-size:11px;}

from ui.jqgrid.css set font-size on the gbox. On the other side gbox div uses ui-widget ui-widget-content ui-corner-all classes too. Because of usage of ui-widget the above setting of font-size:11px; will be ovewritten by

.ui-widget .ui-widget { font-size: 1em; }

if jqGrid will be used inside of some jqGrid widget like jQuery UI Tab or Dialog. So one have to implement some kind of fix. The changes in ui.jqgrid.css, which I suggest will solve the problem.

To be exactly ui.jqgrid.css has already the parts with

.ui-jqgrid .loading { ... }
.ui-jqgrid .ui-jqgrid-pager { ... }
.ui-jqgrid .ui-jqgrid-view { ... }

So I suggest just to remove the setting of font-size:11px; from the

.ui-jqgrid {...}

in the parts .ui-jqgrid .loading { ... }, .ui-jqgrid .ui-jqgrid-pager { ... } and .ui-jqgrid .ui-jqgrid-view { ... }.

I thnk that the small chage will make no side effects.

Later one can make more changes in ui.jqgrid.css and replace the most parts with px to em. I would find this very good, but I find it such changes more complex as what I suggested.

Best regards
Oleg

12/06/2012
08:45
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Oleg,

You are right. Fixed.

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
44 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information