Home > Web Front-end > HTML Tutorial > Table width problem, please help experts_html/css_WEB-ITnose

Table width problem, please help experts_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:13:40
Original
981 people have browsed it


                  
                    
                       
                       
                       
                       
                    
                  
                  
                    
                       
                       
                       
                       
                    
                    
                      
  
     
     
     
     
     
     
  
  
     
     
     
     
     
     
  
  
     
     
     
     
     
     
  


                    
                  
                


当id="t1"的表格显示的列数大于外部table列数时,外部table宽度等于20的td的宽度会变宽,请问如何解决!
急急急!


回复讨论(解决方案)

table的宽度和高度会随着里面的子容器撑开,overlfow:hidden;都不管用,如果想要在td里面限制宽度,在里面加一个div,在套table



 
   New Document 
  
  
  
  
  
 



 
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  



  

  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

  

html>

Still not working, when the width of the div is set to more than 300, the width of the first column of the outer table will become wider

Do you want it to be adaptive? If you don't want the width to change, then add a width limit to everything. If you want to adapt, then add a percentage to everything. If you don't add anything, it would be weird if it keeps changing. Haha

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template