html - 如何将两个表与不同的列对齐
问题描述
我正在制作一个响应式网站,其中有两个垂直对齐的表格。结构如下:
[ title of table 1 ]
[ col1 ][ col2 ]
[ title of table 2 ]
[ col1 ][ col2 ][ col3 ][ col4 ]
标题行使用colspan="4"
,并且此表格布局适用于除 ios 之外的所有内容。
在 iphone 上检查此表时,布局如下所示:
[ title of table 1 ]
[ col1 ][ col2 ]
[ title of table 2 ]
[ col1 ][ col2 ][ col3 ][ col4 ]
有没有办法让它们在所有设备上的宽度相同?
我尝试将表格宽度设置为相同的像素值,并且也尝试设置单元格宽度。到目前为止还没有运气。
解决方案
推荐阅读
- robotframework - Roboframework 在特定测试成功时退出
- c# - 多重随机选择 Linq
- sql - 根据acnod有多少个月
- amazon-web-services - 尝试执行放大推送时出现 AWS Amplify SNSRole 错误
- java - 尝试对特定类别下的项目列表进行分类
- elasticsearch - 在弹性搜索中搜索具有空/空对象字段的文档
- javascript - Why HTML5 input type email doesn't allow empty space?
- matlab - 在矩阵中添加索引列
- bash - 使用代理 Ubuntu-16.04 在 azure-devops 管道 bash cake 任务中获取 ##[error] Bash 并以代码“1”退出
- python - 在同一张图上用彩色图绘制多列数据框