:: Forum >>

strict doctype

Hi, I'm currently evaluating this product.

I've been doing few tests in order to see if the grid fits our needs. So far it looks good.. but I got a big problem. We did major development using strict doctype. There's no way we can drop this.

I've been searching a lot in documentation in forum about strict doctype.. and I must say that I'm confused. Old topics say something about strict doctype being supported in profesionnal edition (didn't see anything about profesionnal edition when purchasing), others say that grid version 2 should work with strict doctype.

Do I need to add anything special? The grid displays, but few CSS stuff doesn't take in effect.. and most importantly, the grid itself doesn't take 100% of it's parent.

If anyone has a way to fix this manually, I don't mind (well, I won't go as far as putting the grid in an iframe).
mdaigneault
Tuesday, October 6, 2009
I think the professional version refers to version 1. With version 2, you either use the trial version or buy the licence you require.

Both strict and quirks mode are supported. There are different AW CSS rules for either mode. Strict mostly seems to add padding around elements from what I've noticed.
Anthony
Tuesday, October 6, 2009
Ok, here's my problem.

When I don't use any doctype, everything works fine. The grid use 100% (width and height) of its parent (a div with fixed width and lenght).

When I add stric doc type, something wierd happen:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


It seems like these CCS styles are ingored:

.aw-grid-control {height: 100%; width: 100%; margin: 0px; font: menu;}

.aw-column-0 {width: 80px;}
.aw-column-1 {width: 30px;}
.aw-column-2 {width: 400px;}
.aw-column-3 {width: 100px;}
.aw-column-4 {width: 150px;}
.aw-column-5 {width: 120px;}
.aw-column-6 {width: 75px;}


All columns' width are fixed to default values.

The grid's width and height seem to be fixed to default values as well (something like 200px and 100px). If I try to add fixed values instead of percentage, it doesn't do anything special.

Am I missing something?
mdaigneault
Wednesday, October 7, 2009
Yes, your problem is due to CSS rules 'specificity' - your rules have lower priority (less number of selectors) and this is enforced in strict mode but not in quirks. You can fix this by adding an ID to the grid and your rules -

obj.setId('myGrid');

and then

#myGrid .aw-column-0 {width: 80px;}

see also /examples/quickref/grid.htm
Alex (ActiveWidgets)
Wednesday, October 7, 2009

This topic is archived.


Back to support forum

Forum search