<html><head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
.box {background:gray;border:3px solid black;float:left;}
</style>
</head>
<body>
<div class="box">
<img src="http://i.stack.imgur.com/shWOu.jpg">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum mattis ante ac sapien pellentesque vitae condimentum odio euismod. In purus nibh, ullamcorper in suscipit non, scelerisque eget sem. </p>
</div>
</body></html>
위의 이미지 크기에 따라 검은 색 테두리 상자 내부 컨텐츠에 적응 자동 폭을 갖는다. 문제는 상자의 크기를 내부의 이미지 너비에 맞게 조정해야한다는 것입니다. 예를 들어 이미지의 너비가 빨간색 상자 인 경우 아래의 텍스트는 파란색 점으로 끝나고 새 줄로 이동해야합니다.
하지만 어떻게해야합니까?
기존 HTML 및 CSS는 무엇입니까? – BoltClock
이동 : http://pastehtml.com/view/1duy9p9.html – donpedroper
CMS 또는 데이터베이스에서 이미지/캡션 콘텐츠를 동적으로 생성 하시겠습니까? –