开发者

Dynamic Div placement based on number of values in a list

开发者 https://www.devze.com 2023-01-27 04:59 出处:网络
I want to be able to change the design of the website based on the content in my database. For example: I have a list of instances of objects that is being pulled from a database, and will be used to

I want to be able to change the design of the website based on the content in my database. For example: I have a list of instances of objects that is being pulled from a database, and will be used to populate my website. I want the website to look similar to www.reddit.com, where there is a <div> for each post. However, I can't figure out开发者_运维百科 how to variably change the location of that <div>. So for the first instance of that object it will be located at top:60px; the second top:200px; etc... (not those exact numbers). If you need any clari

Was looking for some help! Thanks,


Figured it out! I added a variable that I then used to define the "top:" in the html of the template. If anyone wants me to explain further please let me know.

0

精彩评论

暂无评论...
验证码 换一张
取 消