Home > Web Front-end > HTML Tutorial > Please tell me about dl dt dd, problems in positioning, thank you_html/css_WEB-ITnose

Please tell me about dl dt dd, problems in positioning, thank you_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:04:03
Original
1553 people have browsed it








无标题文档





  

  

  
 通知公告

  

  

      
  • 1dsfsfsd

  •    
  • 2sdffsfsf

  •     
  • 3sdfdsfsdfs

  •      
  • 4sdfsfsdf

  •   

  
 
  

  

  







I write the title on the dt in dl, and nest a ul li list in dd

I have set the margin padding of ul to 0. But there are still problems with positioning, it cannot be left aligned, and ul is included in dd, so why is it higher than its upper boundary.


Reply to discussion (solution)

Remove default style

ul,dl,dd{margin:0;padding:0;}
Copy after login

Brother Chicken, I would like to ask



#mydiv2 dl{
height:30px;
background-color:#0FF;
margin:0px;
padding: 0px;
}



#mydiv2 dl dd ul {
. . . . . .
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
padding-top: 0px;
padding- right: 0px;
padding-bottom: 0px;
padding-left: 0px;
}


I indirectly set these items to 0 in this code, why not Does it take effect? ​​

How can it take effect if you set it directly like you did? ?

Research found that the margin of dd is not set.

It seems that the padding of dl does not work on dd



Brother Ji, I have another question, I set the height of dt, why is the result larger than the set height? Times? ?







Untitled Document








;/dl>








=》

Related labels:
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