|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
CSS: Table-less columns and wrapping
I just need my page to display a text header, then list one block at a time. Each block will consist of two columns. One column will display data titles, the other will display the data.
I thought I could accomplish this with CSS by nesting DIV tags, but it's not working the way I imagine it would. Here's my PHP code followed by the pertinent CSS: PHP Code:
CSS: PHP Code:
This is definitely a problem with me not knowing CSS well enough. |
|
#2
|
||||
|
||||
|
Hm. Threw a width: 100% into the block div... and that seems to do what I want it to.
Still an ugly hack? |
|
#3
|
|||
|
|||
|
Well, for starters you need to change the id's to classes as you can not have more than one element with the same id.
|
|
#4
|
||||
|
||||
|
If you want #block to contain .column, you need to float it as well.
Code:
#block
{
float: left;
top: 20px;
border: 1px solid #999;
margin: 5px;
padding: 10px;
}
.column /* column ids to classes in PHP */
{
clear: left;
float: left;
line-height: 25px;
margin: 3px;
}
__________________
# Jeremy Explain your problem instead of asking how to do what you decided was the solution. |
|
#5
|
||||
|
||||
|
Even nicer. Thanks for the help Eclipce and jharnois.
Good luck with Lua, too. |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > CSS: Table-less columns and wrapping |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|