tylerjca
01-12-2007, 06:28 AM
Okay, I've been trying to use DIVs for layout purposes since I understand they are the better and "more efficient" way. The problem I'm having is I'm trying to get the same effect that would otherwise be MUCH easier and quicker using a table...
Since with <td>'s, they only go to a new row when you use <tr>, it just keeps adding cells to the right and never "carriage returns" (for lack of a better term). I want to have the same effect with DIVs, but I don't know how to it.. I'm using the float: left method, but when an element within the next div is set to 100% (such as tabular data within a table), the whole element is brought underneath the floating DIV, rather than span 100% of the remaining space on the page... how can I AVOID this? If there's no easy way, I see no reason NOT to use tables in layouts. They're cleaner, they do what you want them to, and you don't have to fuss with a lot of CSS to get everything to line up properly.
Mind you, I do find it better to use DIVs in a layout because just with CSS, I can completely change the way everything is set up. I sometimes use DIVs for a 2-pane or 3-pane layout, but only when I know the person's resolution isn't going to be lower than 1024 x 768. Otherwise, all the DIVs pile over top of one another when the an element in the center is wider than the remaining space.. or set to 100%.
ANYWAYS... if anyone can help me out with this, that would be great..
Thanks in advance :thumbsup:
Since with <td>'s, they only go to a new row when you use <tr>, it just keeps adding cells to the right and never "carriage returns" (for lack of a better term). I want to have the same effect with DIVs, but I don't know how to it.. I'm using the float: left method, but when an element within the next div is set to 100% (such as tabular data within a table), the whole element is brought underneath the floating DIV, rather than span 100% of the remaining space on the page... how can I AVOID this? If there's no easy way, I see no reason NOT to use tables in layouts. They're cleaner, they do what you want them to, and you don't have to fuss with a lot of CSS to get everything to line up properly.
Mind you, I do find it better to use DIVs in a layout because just with CSS, I can completely change the way everything is set up. I sometimes use DIVs for a 2-pane or 3-pane layout, but only when I know the person's resolution isn't going to be lower than 1024 x 768. Otherwise, all the DIVs pile over top of one another when the an element in the center is wider than the remaining space.. or set to 100%.
ANYWAYS... if anyone can help me out with this, that would be great..
Thanks in advance :thumbsup: