I'm trying to align 3-5 items up in a table cell, three are on the top and two are on the bottom. In each of my table cells I want the first item to be at the top left of cell and the third item I want to be at the top right of the cell. Those two are working just fine with a CSS class .classname { position: relative; float: top; float: left; }
and likewise for the right floating item. It's the 2nd item in the cell I'm having trouble with, I can't get it to float in the top center of the cell. .classname { position: relative; float top; float: center; }
Any ideas how I can pull this off? All the items are currently in <span>
tags.
Thanks for any and all replies.
lewashby
56
Junior Poster
Recommended Answers
Jump to PostThere doesn't exist a
float: top
andfloat: center
The float property can only haveleft
,right
,initial
,inherit
andnone
.If you want to align content in table cells as the way tou want, you will need the properties text-align and vertical-align and there's no need for span tags …
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.