CSS - Css, Php, Div, Mysql, And Photos
Ok...so I want to create a photo gallery with dynamic content and layout. The hardest part was formating the page to make a php script that would pull the data from the DB and lay it out in a table. But if I used a standard HTML Table tag then the layout would not be dynamic. I searched around and found this script...
<style> div.float { float: left; } div.float p { text-align: center; } </style> <div class="float"> <img src="image1.gif" width="100" height="100" alt="image 1" /><br /> <p>caption 1</p> </div> <div class="float"> <img src="image2.gif" width="100" height="100" alt="image 2" /><br /> <p>caption 2</p> </div> <div class="float"> <img src="image3.gif" width="100" height="100" alt="image 3" /><br /> <p>caption 3</p> </div> This will make the pictures wrap to the next row if there was an overflow. How would I make it so that instead of an image wrap...it would just display the images in X amount of colums? I am new to CSS...but not HTML, I understand how the above script works...but I do not know enough code to figure the probem out myself. Thank you for your help. Similar TutorialsI was mucking around with my style.css at tekindoor.com changing my header around. and I lost all of my photos. I just made some minor changes. I don't know how this could have happened. Do you see anything wrong? I am having trouble with my site at tekindoor.com/phpbb/ not showing images including the favicon. Hi, I have 3 photos each with a credit (in text) beneath. I want them positioned relative to each other but to stay centered with the rest of the page. How do I wrap them? How do I position them? HI Guys, I'm trying to create some CSS to contain an image gallery. A query runs which grabs all the images for a certain item/article. I then output the query as a loop, and it populates a div with images. It works pretty good, but if one image is bigger than the others, it throws off the alignment. How can I force each row of photos to be horizontally even? You can see the output results here http://details.at/photo_test.cfm <!--- Query ---> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> <style> #maindiv { padding:0 0 1em 2em; width:550px; float:left; } div.img { margin:3px; height:auto; width:auto; float:left; text-align:center; } </style> </head> <body> <DIV id="maindiv"> <H2>Photos</H2> <CFOUTPUT QUERY="photo_file_info"> <div class="img"> <a href="http://google.com" target=new> <img src="http://details.at/imagehost/classifieds/aircraft/139/s_#photo_file#"> </a> </div> </CFOUTPUT> </DIV> </body> </html> Ok, I saw a topic that touched on this, but it was left unanswered, and was from 2002. I am attempting to build a web application that can be used by people to alter their profile design and style in their personals profile (dating site). I have managed to do this already manually by using the @import css command. This gives pretty much total control over the displayed profile. However, instead of creating an individual css file for each person (which could be alot of people) I want to use one css file, or rather a php file. I have managed to use php, style.php, and alter the heading to make it read as a css file via Code: <?php header("Content-type: text/css"); Ok, I have even tested this out, with a certain text class, and managed to alter its color via variables in the php. Eg - set the text color for the text labeled .g-s-n to be Code: $text1 = "119922"; then I insert that into the css via Code: .g-s-n{color:<?=$pageFG?>; THIS WORKS.... However, in order to make this one file work for everyone, I need it to query a database (sql) which I have done, it does return the values, the correct values too, but then it just doesnt work. Its like it takes too much time processing the query, and the page displays before the numbers can be retrieved. The result is that instead of a green text color, I get stuck with a dull grey. It does get the value, Im just unsure why it doesnt show it. Anyone know anything that might help? I am unable to use javascript in this circumstance because the dating site blocks most javascript commands, and the text fields in their profile section are limited in character space. Hi, I have over 7 years of programming experience. For demonstration of my development skills (or just to see something cool) visit the following link: URL I am experienced teleworker with solid knowledge of computers and Internet. If interested feel free to send me e-mail: theitf @t theitf | net Regards, Lubo well, I have a habit of making every one of my websites also an experiment with something new. Last time it was PHP, now it was CSSes and MySQL. They both were easy to learn, but I've already had to rewrite much of all of it to make my code cleaner and more proper. I've still got lots of that to do though, and I suppose I should do it before really promoting my website. So any feedback would be great: URL my site uses php and mysql database but the html has some nested tables on several pages, is it worth me changing my code to implement using css and no tables? whats everyones opinion on this? is it just better to leave it in tables, they are pretty messy i must say! i have 3 tables nested, and loads of php mysql code in there too any advice appreciated, Hi everyone, I have some text generated from my database as a menu and it automatically puts it in a list. I want it to go side by side so I can overlay it onto an image. My code that generates the text is: Code: <?php $sql = "SELECT * FROM cms_recent_news ORDER BY timestamp DESC LIMIT 5"; $result = mysql_query($sql) or print ("Can't select entries from table cms_recent_news.<br />" . $sql . "<br />" . mysql_error()); while($row = mysql_fetch_array($result)) { $date = date("l F d Y", $row['timestamp']); $title = stripslashes($row['title']); $entry = stripslashes($row['entry']); $id = $row['id']; if (strlen($entry) > 0) { $entry = substr($entry, 0, 0); $entry = "$entry<a href=\"journal_rn.php?id=" . $id . "\">$title</a>"; } ?> <?php echo $entry; ?><br /><br /> <?php } ?> Is there anyway for me to do this? Thanks in advance Hi all, I dnt want to retype my situation, i put my 1st thread in the wrong forums. U can read up on what my query is in this link http://forums.devshed.com/t188904/s.html Thanks all Jim |