I’ve been working on a gallery made in php. Some time ago, I made the layout using tables. It worked out super. Now, using tables for layouts is not recommended and sort of “deprecated” (I don’t understand why, if someone could explain this to me, thank you). So, I’m trying to change the layout from tables to divs and I’m having a lot of problems (can someone recommend a good reference to how to make a good layout using css?). So far I managed this: [http://jsfiddle.net/hochvater/4DbUU/](http://jsfiddle.net/hochvater/4DbUU/ “”) . MY FIRST QUESTION is this: how do I make the #panel_poze div to show up in the top of the container div, glued to the #panel_albume (as it is now)? I don’t understand why #panel_albume is lined with the 3rd div contained by the div it is glued to (#panel_albume). My second question would be this: can’t I just put the big table (you can imagine easily how it looks by the structure of the divs) into a container div and sort of leave it as it was…would this still be considered “deprecated” or not recommended?
Sorry, it’s the first time I post something here! The gallery code doesn’t look as it should have and I don’t know how to edit the post. Anyhow, if you want to have a look over it, just access the link to jsfiddle I provided. The css code is much more important in solving the issue rather than the gallery code. Thanks a lot, again!
I figured it out! Sorry for wasting your time, guys! In the css code, the height of 100px of #panel_poze div was the problem…I changed that and it worked just fine! Look on the link to jsfiddle for the change!
@Hochvater — the tables vs. divs discussion is because tables are not meant for laying out a page. Tables are meant to show tabular data; data that is supposed to be shown in columns and rows.
While a table CAN be used to lay out a page, the current common way of doing this is by using DIVs, because that’s much easier to manipulate, change, and lay out. Putting your layout in table makes it less flexible to move things around.
It’s like saying that you can make a car out of wood, but you shouldn’t cause steel is much better suited for it. Hope that makes sense.