html - 表格宽度不适应分辨率

标签 html css

这就像表格预定义了最大宽度但不确定是什么问题...

如您所见,当分辨率为 1024x768 时,表格位于外部 div 之外

代码:

外部分区:

<div id="resourceGenerator_details_tab_div" class="tabsContent" style="float: none; height: auto; width: auto; display: block;" tabclick="" tabtext="Details" parenttabbarid="rg_tabBar" buttonid="rg_tabBar_resourceGenerator_details_tab_div_tab">

在这个 div 中我有:

<table cellspacing="0" cellpadding="1" border="0" style="width: auto; height: auto;">

最佳答案

而不是 auto , 使用 100%

<table cellspacing="0" cellpadding="1" border="0" style="width: auto; height: auto;">

让它成为:

<table cellspacing="0" cellpadding="1" border="0" style="width: 100%; height: auto;">

并确保添加到 containerwidth:100%;height:100%;

关于html - 表格宽度不适应分辨率,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20998858/

相关文章:

html - 如何在 html 中创建这些类型的表

html - SVG 图像 Logo 未在 Firefox 中显示

javascript - 如何用jquery覆盖css

html - 让色谱柱发挥作用?

html - Bootstrap 3 文本对齐 : center not working

html - 在 SSRS 报告中显示 HTML 页面

javascript - 在文档加载中运行脚本

html - 在以下情况下如何使用 CSS 在悬停时更改元素属性

javascript - 具有自动宽度的 Owl Carousel 元素

css - 无法将 div 设置为 100% 高度