The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
HTML/CSS - Flexibile number of columns
Several image sites out there like deviantart and bing vary the number of columns of images, based on the screen size. If you resize the window to make it smaller for example, the number of columns of images decreases.
Can this be achieved simply with HTML / CSS or is a javascript mod needed to work out the screen size? |
#2
|
||||
|
||||
Hi,
My current code is designed to have a flexible number of columns depending on the width of the screen. It is just divs with a left and right margin: HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link rel="stylesheet" type="text/css" href="css.css" /> </head> <body> <div><img src="1.jpg" alt="Angry face" title="Angry face" /></div> <div><img src="1.jpg" alt="Angry face" title="Angry face" /></div> <div><img src="1.jpg" alt="Angry face" title="Angry face" /></div> <div><img src="1.jpg" alt="Angry face" title="Angry face" /></div> <div><img src="1.jpg" alt="Angry face" title="Angry face" /></div> </body> </html> Code:
div{ width:120px; height:90px; float:left; background:#999999; margin-left:3%; margin-right:3%; margin-bottom:13px; border-style:solid; border-width:1px; border-color:#e2e2e2; } Can anyone help me with this? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|