Home  >  Article  >  Web Front-end  >  表格宽度问题,请高手帮忙_html/css_WEB-ITnose

表格宽度问题,请高手帮忙_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:13:40927browse


                  
                    
                      
                      
                      
                      
                    
                  
                  
                    
                      
                      
                      
                      
                    
                    
                      
                    
                  
                
       
       

  
    
    
    
    
    
    
  
  
    
    
    
    
    
    
  
  
    
    
    
    
    
    
  
           
           
           




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


回复讨论(解决方案)

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

nbsp;HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

 


   New Document 
  
  
  
  
  
 

 
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
       
       

  

  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
fgzgd &fgzgdfgzgd; &fgzgdfgzgdfgzgd; &nfgzgdfgzgdfgzgdbsp; &fgzgdfgzgdfgzgd; &nfgzgdfgzgdbsp;
           
           

  



   
 

还是不行,当div的宽度给到300以上的时候就会出现外面table第一列的宽度变宽

你是想要自适应吗?如果你不想宽度有变,那么就所有都加上宽度限制,如果要自适应,那就所有都加上百分比,你什么都不加,不变来变去才怪呢。呵呵

Statement:
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