I'm building a website to take into account the device size. I'm using CSS3's @media tag to change the webpages appropriately as the viewport size changes. I also have a listview control to display products. I would like to be able to dynamically set
the number of items per page and the number of items in each group as the viewport changes. Is this possible?
I would argue that the exception is Smart Phones where you need a completely different site navigation pattern and layout targeted to a 320px by 480px screen size and scaled to 1.
see m.bing.com or m.seek.com.au - mobile optimized sites that don't use server side UAS sniffing.
of the layout types discussed there are two versions... fixed and fluid... only a fluid layout will scale to fit all screen sizes.... you adjust the scaling in a device viewing a web page with the viewport meta tag....and using the HTML5 document type declaration.
The size is not sent to the server, you could sniff the nrowser type on the server and send down different pages. Plenty of code examples on the net available for that.
I totally agree with Eric. An (not so easy) approach would be to create a flexible layout (because of line breakings) and let the user choose how many entries he would like to see on one page (like you see on many sites).
Regards.
If my post solves your problem, please mark as answer.
I'm sorry. Due to illness in the family I had to put this aside for awhile.
I do have a fluid layout, and I can certainly let the user select how many items to display, but this is where I run into a problem.
I'm using a listview control. At the moment I have it set to dsiplay three records across. However I'd like to let the listview display however many records across it can handle. I can easily do this with CSS. My problem is I think it looks bad to allow
say, 10 records per page, and display 4 records across. You get three rows of 4, 4, and 2 records on every page but the last. I'm looking for a way to update my datapager server side so that each row of each page is full, as long as I have enough records.
Mainship
Participant
864 Points
2037 Posts
Server side counterpart for CSS 3 browser size detection?
Apr 10, 2012 08:29 PM|LINK
I'm building a website to take into account the device size. I'm using CSS3's @media tag to change the webpages appropriately as the viewport size changes. I also have a listview control to display products. I would like to be able to dynamically set the number of items per page and the number of items in each group as the viewport changes. Is this possible?
iecustomizer
Member
404 Points
82 Posts
Re: Server side counterpart for CSS 3 browser size detection?
Apr 11, 2012 07:14 AM|LINK
Hi,
see this building windows 8 blog post...
http://blogs.msdn.com/b/b8/archive/2012/03/21/scaling-to-different-screens.aspx
- all done client side with css 3 and html5
I would argue that the exception is Smart Phones where you need a completely different site navigation pattern and layout targeted to a 320px by 480px screen size and scaled to 1.
see m.bing.com or m.seek.com.au - mobile optimized sites that don't use server side UAS sniffing.
aslo see this excellent article
http://sixrevisions.com/web_design/a-guide-on-layout-types-in-web-design/
of the layout types discussed there are two versions... fixed and fluid... only a fluid layout will scale to fit all screen sizes.... you adjust the scaling in a device viewing a web page with the viewport meta tag....and using the HTML5 document type declaration.
Regards.
A1ien51
All-Star
29935 Points
5821 Posts
Re: Server side counterpart for CSS 3 browser size detection?
Apr 11, 2012 12:00 PM|LINK
The size is not sent to the server, you could sniff the nrowser type on the server and send down different pages. Plenty of code examples on the net available for that.
Eric
Horizon_Net
Star
8309 Points
1441 Posts
Re: Server side counterpart for CSS 3 browser size detection?
Apr 11, 2012 08:30 PM|LINK
Hi,
I totally agree with Eric. An (not so easy) approach would be to create a flexible layout (because of line breakings) and let the user choose how many entries he would like to see on one page (like you see on many sites).
If my post solves your problem, please mark as answer.
Mainship
Participant
864 Points
2037 Posts
Re: Server side counterpart for CSS 3 browser size detection?
Apr 25, 2012 09:20 PM|LINK
I'm sorry. Due to illness in the family I had to put this aside for awhile.
I do have a fluid layout, and I can certainly let the user select how many items to display, but this is where I run into a problem.
I'm using a listview control. At the moment I have it set to dsiplay three records across. However I'd like to let the listview display however many records across it can handle. I can easily do this with CSS. My problem is I think it looks bad to allow say, 10 records per page, and display 4 records across. You get three rows of 4, 4, and 2 records on every page but the last. I'm looking for a way to update my datapager server side so that each row of each page is full, as long as I have enough records.