Mobile device resolution (width, height) screen size header
It's worse than you think.
UA-pixels: 320x240
Is often a lie. On IEMobile version <8 (Windows Mobile <6.1.4) devices with 640x480 pixels still report themselves as 320x240. In addition, in most versions of IEMobile the view may be zoomed to some extent so that the design size you have to hit is unrelated to the UA-pixels size.
The opportunities for liquid layout are limited prior to IEMobile 8. Yet in IEMobile 8 on WinMobile 6.5 you get about XGA resolution, zoomed out, whether you like it or not. Oh, and there is no way to sniff IEM8-on-6.5 vs. IEM8-on-6.1 from the headers.
I'm not sure what exactly the purpose of your application is, but outputting HTML/CSS that renders exactly to the size of the screen is practically impossible if your targets include the abysmal horror that is IEMobile.