creating a Windows Explorer type frame dynamically

liunx

Guest
I'm trying to create a page which shows files that the user can Download <!--more-->, and I want it to look like Windows Explorer does (with the 'View as -> Large Icons' look). The problem is getting the items to wrap. Each item is an image and a filename. The page will be created dynamically from a database so I won't know in advance how many columns and rows there should be. <br />
<br />
How can I create the page so that the file items wrap to the current page width?<!--content-->either way you will have to decide how many icons to put on 1 line. you can create a loop that detects how many icons will be in that row then just make a new row after that numbr is rreached. so what I am trying to say is you need to decide how many icons will fit in that row before you start. or just make the row a certain size in width and it will auto-insert them.<br />
<br />
windows explorer decided that it will only show 6 across (by my resolution) and it is dynamic, so pick a number and set it as that.<!--content-->Thanks. It's dissapointing to hear that it's not possible without deciding in advance the maximum number that can be shown horizontally.<!--content-->I didn't say that. I said you have to either decide on a width (table size) to go to or the maximum number. just because it is dynamic you still have to make descions.<br />
<br />
that is the breaks of progrmming.<!--content-->I've went over what you said about 100 times and still don't understand the distinction that you're making.<br />
<br />
I can say either<br />
<br />
1) "after 6 <td>'s create another <tr>"<br />
or<br />
2) ??<!--content-->or set the width of the table to a certain width.<br />
<br />
say you had a table set to 500<br />
<br />
eg.<br />
<br />
<table width="500"><br />
table stuff<br />
</table><br />
<br />
now it will only go 500 pixels and stop. so the browsers knows now that once it starts inserting images and it reaches 500 pixels it will stop and do a line break.<br />
<br />
that si how windows does it. it is set to the users resolution and if that gets bigger then the number of icons increase. you either want it set to a certain pixel or you go 100% and it will go right to the edge of the screen.<br />
<br />
so<br />
<br />
1) "after 6 <td>'s create another <tr>"<br />
or<br />
2) set teh width of the table<br />
or<br />
3) count how many icons you want per row then add a line break.<!--content-->I'm bumping this because I found a good, simple way to do it just using some css on this page:<br />
<br />
<!-- m --><a class="postlink" href="http://www.alistapart.com/articles/practicalcss/">http://www.alistapart.com/articles/practicalcss/</a><!-- m --><!--content-->and that is going to help how? you still have to hard code them or put them in a loop, but hey I already suggested this up a few posts. but good job as that is the way to go.<!--content-->Not sure if I understand what you mean Scoutt (or where you suggested that solution), but it's perfect because I don't need to decide in advance how many images I will have across the screen, and I don't have to hard code anything. All I do is loop over my list of image items. It's perfect :) Thanks for your help..this is a great forum.<!--content-->
 
Back
Top