A
Arondelle
{{I know you've heard this 100m times. Publish a FAQ....}}
I've been playing around with 4-column tables, and have had some success
in getting the table cells to line up correctly.
Now, I'm working on getting the contents, thumbnails, to line up the way
I want them to: centered both vertically and horizontally.
"text-align:center;" works OK for the horzontal alignment.
"vertical-align:middle" does not work for the vertical alignment. I've
seen it work before, but I seem to be missing something here.
Misspelling? Misusing? Not in the right place in the list?
The style sheet is below; the commented lines are there for the purposes
of testing. The HTML can be found at:
http://www.red-death.com/~arondelle/graphics/thumbnail-table.html
No, there are no links on the thumbnails yet: one thing at a time,
please....
<!-- sample style sheet -->
body{
/*margin-left: 12%;*/
cursor: crosshair;
}
h3{
font-weight:bold;
font-style:normal;
text-align:center;
vertical-align:middle;
padding: 0;
margin: 0;
}
div#t-body{
width: 618px;
border: 4px ridge cyan;
}
div img{
border: 0;
vertical-align: middle;
text-align: center;
}
div#tcol-first{
width:25%;
height: 150px;
float:left;
/*text-align: center;
vertical-align: middle;*/
padding: 0;
border: 2px solid red;
}
div#tcol-second{
width:25%;
height: 150px;
float:left;
/*text-align: center;
vertical-align: middle;*/
padding: 0;
border: 2px solid blue;
}
div#tcol-third{
width:25%;
height: 150px;
float:left;
margin-right: -2px;
/*text-align: center;
vertical-align: middle;*/
padding: 0;
border: 2px solid lime;
}
div#tcol-fourth{
width:100%;
height: 150px;
margin-left: -2px;
/*text-align: center;
vertical-align: middle;*/
padding: 0;
border: 2px solid yellow;
}
<!-- -->
I've been playing around with 4-column tables, and have had some success
in getting the table cells to line up correctly.
Now, I'm working on getting the contents, thumbnails, to line up the way
I want them to: centered both vertically and horizontally.
"text-align:center;" works OK for the horzontal alignment.
"vertical-align:middle" does not work for the vertical alignment. I've
seen it work before, but I seem to be missing something here.
Misspelling? Misusing? Not in the right place in the list?
The style sheet is below; the commented lines are there for the purposes
of testing. The HTML can be found at:
http://www.red-death.com/~arondelle/graphics/thumbnail-table.html
No, there are no links on the thumbnails yet: one thing at a time,
please....
<!-- sample style sheet -->
body{
/*margin-left: 12%;*/
cursor: crosshair;
}
h3{
font-weight:bold;
font-style:normal;
text-align:center;
vertical-align:middle;
padding: 0;
margin: 0;
}
div#t-body{
width: 618px;
border: 4px ridge cyan;
}
div img{
border: 0;
vertical-align: middle;
text-align: center;
}
div#tcol-first{
width:25%;
height: 150px;
float:left;
/*text-align: center;
vertical-align: middle;*/
padding: 0;
border: 2px solid red;
}
div#tcol-second{
width:25%;
height: 150px;
float:left;
/*text-align: center;
vertical-align: middle;*/
padding: 0;
border: 2px solid blue;
}
div#tcol-third{
width:25%;
height: 150px;
float:left;
margin-right: -2px;
/*text-align: center;
vertical-align: middle;*/
padding: 0;
border: 2px solid lime;
}
div#tcol-fourth{
width:100%;
height: 150px;
margin-left: -2px;
/*text-align: center;
vertical-align: middle;*/
padding: 0;
border: 2px solid yellow;
}
<!-- -->