Best way to re-create a dynamic table in css

Curious to see what method other people are using to re-create fluid tables in CSS. Back in table days, if there wasn't a width set the table would just auto-adjust to make the columns fit. Let's say: We have a 2column "table" display a product. Image on the left, Name/Description on the right. Let's also say: Image width is unknown. Typically in this situation, what I do is float the image left and hide the overflow on the content to the right. If we have rows of data though, this simply will not work as everything will have different margins. Yes, We could just say: Images will not be bigger then x so let's float the image left and set a left margin on the right side content. - or even float the content on the right to the right. Doing this really isn't a problem, however I am just curious as if there was a way to make it all fluid... Some of these sites I'm working on have enormous stylesheets and I'm trying to keep the styles to a minimum. Our designer likes to use this image to the left, content to the right - or even reversed... image to the right content to the left A LOT, but it seems as the margins are always different per situation. I really want to make this a re-usable class.

以上就是Best way to re-create a dynamic table in css的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HTML5 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏