우선, 내 질문이 명확하지 않을 수 있습니다. 나는 그것을 설명하려고 노력할 것이다.HTML에서 공간 또는 개행 효과를 최소화하는 방법은 무엇입니까?
이
<div class="left"><?php print $search_box; ?><?php if (!empty($logo)): ?><a href="<?php print $base_path; ?>" title="<?php print t('Home'); ?>" rel="home"><img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" id="logo" width="243" height="62" /></a><?php endif; ?><?php if (!empty($site_name)): ?><div id='site-name'><strong><a href="<?php print $base_path; ?>" title="<?php print t('Home'); ?>" rel="home"><?php print $site_name; ?></a></strong></div><?php endif; ?><?php if (!empty($site_slogan)): ?><div id='site-slogan'><?php print $site_slogan; ?></div><?php endif; ?></div>
오른쪽 디버깅 추한 어려운 보이는 내 HTML입니까?
그래서 들여 쓰기 및 줄 바꿈을 추가하려고합니다. 그러나 일부 브라우저에서는 IE6이 될 수 있습니다. 결과가 변경됩니다. 그래서, 다른 Doctype을 사용해야합니까?
현재, 내가
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
코드를 들여 쓰게하고 PHP 블록을 끝내서 HTML을 추가하는 대신 HTML을'$ echo'하여 그 코드가 더 잘 작동하는지 확인하십시오. 내가 분명히해야 할 일이 있으면 알려주세요. –