Home >Web Front-end >HTML Tutorial >How to locate dl dt dd? _html/css_WEB-ITnose

How to locate dl dt dd? _html/css_WEB-ITnose

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

I want to implement a picture and a list of titles below. I don’t know how to position the title dt under the picture dd? The code is as follows

f6dad64138c04d12179482f307934dc6
68ccb177a5de0ef9542dde7d35bae727
93f0f5c25f18dab9d176bd4f6de5d30e
7c7c8f44c97bf2780b8f647c6a07bf90
b2386ffb911b14667cb8f0f91ea547a7Untitled Document6e916e0f7d1e588d4f442bf645aedb2f
080b747a20f9163200dd0a7d304ba388
.list {
width:400px;
height:70px;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto ;
}
.list dl{
float:left;
}
.list dt dd{
width:80px;
}
531ac245ce3e4fe3d50054a55f265927
9c3bca370b5104690d9ef395f2c5f8d1

6c04bd5ca3fcae76e30b72ad730ca86d
64bc10840cfde85a6e97080a8002ae32
5c69336ffbc20d23018e48b396cdd57a
67bc4f89d416b0b8236eaa5f43dee7425f351c9c971fa2d61f9497e5d3d9024e82e295699cff932a4d4dabba39074c35
73de882deff7a050a357292d0a1fca941c72c1af5e0e7f90179c047c5ef85885e
5c69336ffbc20d23018e48b396cdd57a
67bc4f89d416b0b8236eaa5f43dee742a11687beca1744691b34f8133f3b6001 73de882deff7a050a357292d0a1fca942c72c1af5e0e7f90179c047c5ef85885e
cd324b2387ec29e44e8e788c60648872
5c69336ffbc20d23018e48b396cdd57a
67bc4f89d416b0b8236eaa5f43dee74279aefe5f166880d8b6077a69f1d8462282e295699cff932a4d4dabba39074c35
73de882deff7a050a357292d0a1fca943c72c1af5e0e7f90179c047c5ef85885e
cd324b2387ec29e44e8e788c60648872
16b28748ea4df4d9c2150843fecfba68
36cc49f0c466276486e50c850b7e4956
73a6ac4ed44ffec12cee46588e518a5e


Reply to discussion (solution)

Model Game News

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档 </title> <style type="text/css"> .list{ width:400px; height:70px; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto;text-align:center; } .list dl{     float:left; 	margin-left:10px;} .list dd{ width:auto;	margin:0px;} .list dt{ margin:0px;} </style> </head> <body> <div class="list"> <dl> <dd> <img src="http://avatar.profile.csdn.net/D/B/D/2_zh050317.jpg" /> </dd> <dt>1 </dt> </dl> <dl> <dd> <img src="http://avatar.profile.csdn.net/D/B/D/2_zh050317.jpg" /> </dd> <dt>2 </dt> </dl> <dl> <dd> <img src="http://avatar.profile.csdn.net/D/B/D/2_zh050317.jpg" /> </dd> <dt>3 </dt> </dl> </div> </body> </html> 

Why use such a strange method?
I always thought that dl dt dd is sequential and cannot be changed. I have learned a lot

Simplify the code on the second floor:
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
Just write: margin:0px auto; That’s it

That’s okay too

That’s okay But don’t you think it’s a waste of time? Make it easier and faster.

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