间距问题 [英] spacing problem

查看:68
本文介绍了间距问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是网站创建的新手.我已经设计了整个网站.我遇到了间距问题.第一行标题和第二行水平菜单.在水平栏间距问题中,如果我增加1像素,水平菜单将下降.如果我减少一点点空间,与标头相比要少.请任何人帮帮我.

这是我的示例代码:

 <  !DOCTYPE     html     PUBLIC    -//W3C//DTD   XHTML     1.0  过渡//EN"    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
从URL =(0033)中保存的<!-   www.africatradingcorp.com/ ->  
<   html     ="   http://www.w3.org/1999/xhtml" >  <  头部 >  <      http-equiv   ="    内容  文本/html; charset = UTF-8" <  标题 > 金奈旅游业<  /title  > 
<  样式    ="   text/css" <  /style  > 
<  /head  > 
<  正文 > 
<      ="   100%" 边框   0"   单元格间距  ="  0"  cellpadding    0"  bgcolor   ="  > 
  <  正文 >  <   tr  > 
    <   td  > 
     <      ="   800" 边框  > 0"    单元格间距  ="  0" 单元格填充   0"    bgcolor   ="     align   =" 中心" > 
     <   tr  > 
      <   td     ="   center"    img1"   高度  ="  40" >   img   src   ="  高度     宽度  ="  40"  align   ="  / >  <  /td  <   td     class   ="     align   =" 中心" >  <  字体    ="  字体家族:日内瓦,阿里亚尔,海尔维蒂卡,无衬线;字体大小:25px;颜色:#D8D8D8;" <  /font  >  <  /td  > 
      <   td     ="  右"  valign    top"     ="  img" <   img     src   ="     height   ="    宽度  ="  / >    <   img     src   ="  高度  ="    宽度  ="  25" >  <   img    <水疗中心n class ="code-attribute"> src   ="  宽度  ="  高度  ="  >  <  /td  > 
     <  /tr  > 
    <  /table  > 
    <      ="  #FFFFFF" 宽度   800"   单元格填充  ="  0" 单元格间距   0" 对齐  ="  >> 
    <  正文 > 
    <   tr  >  <   td  > 
    <      ="   0" 单元格间距   0"   宽度  ="  800"  align   中心" <  正文 >  <   tr  > 
     <   td     ="   center" <   ul     ="   navi" <   li  >  <   a     ="  向下" > ;  Home <  /a  >  <  /li  > 
       <   li  >  <   a     ="   about.html" > 关于<  /a   > 
      <  /li  > 
      <   li  >  <   a     ="  " > 在线<  /a  > 
      <   ul  > 
      <   li  > 
      <   a     ="  " > 旅行预订<  /a  > 
      <  /li  > 
       <   li  > 
      <   a     ="  " > 旅游预订<  /a  > 
      <  /li  > 
      <  /ul  > 
      <  /li  > 
      <   li  >  <   a     ="  " >  Forms <  /a  > 
      <   ul  > 
      <   li  >  <   a     ="  " > 预订<  /a  >  <  /li  > 
      <   li  >  <   a     ="  " > 游览<  /a  >  <  /li  > 
      <  /ul  > 
      <  /li  > 
      <   li  >  <   a     ="  " > 酒店<  /a  > 
      <   ul  > 
      <   li  >  <   a     ="   Accomidation.html" >  Accomidation <  /a   >  <  /li  > 
      <   li  >  <   a     ="  " > 车辆<  /a  >  <  /li  > 
      <  /ul  > 
      <  /li  > 
      <   li  >  <   a     ="  " >  TravilTips <  /a  >  <  /li  > 
      <   li  >  <   a     ="  " > 联系我们<  /a  > 
      <   ul  > 
       <   li  > 
        <   a     ="  " >  FeedBack <  /a   > 
       <  /li  > 
      <  /ul  > 
      <  /li  > 
     <  /ul  > 
  <  /td  > 
 <  /tr  > 
<  /tbody  >  <  /table  > 
 <  /td  > 
 <  /tr  > 
   <  /tbody  >  <  /table  > 
<  /body  >  <  /html  >  

解决方案

如果您可以清楚地说明要通过增加1 px的空间来表示要实现的目标,则可以获得更多的响应.


Hi,

I am new to website creation.I had designed entire site.I am getting spacing problem.First row header and second row horizontal menu.in horizontal bar spacing problem if i increase 1px horizontal menu will come down.if i decrease little bit space is less compare to header.Please any one help me.

Here is my sample code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0033)http://www.africatradingcorp.com/ -->
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>chennai tourism</title>
<style type="text/css">
body { margin:0px auto;background-color: #FFFFFF;font-size:13px;}
ul#nav, ul#nav ul { padding:0;  list-style: none;}
ul#nav  li {position: relative; float: left;width:114px;font-family: Verdana, Arial, Helvetica, sans-serif;}
#nav li ul {position: absolute;margin-left: -999em; /* hide menu from view */top: auto;left:0;}
/* Styles for Menu Items */
ul#nav  li a {display: block;text-decoration: none;color: #FFFFFF;background:#700000   ; /* IE6 Bug */padding: 5px;min-height:0;            }
ul#nav li a.down {display: block; text-decoration: none; color:#FFEBCD ;  /* IE6 Bug */ padding: 5px; border-top:0px solid #B8860B;
    border-bottom:0px solid #ccc;border-left:0px solid #ccc;border-right:0px solid #ccc;min-height:0; }
ul#nav li a.down:hover { color:#700000; background-color:#D8D8D8;}
/* commented backslash mac hiding hack \*/
* html ul#nav  li a {height:1%; position:relative;}
/* end hack */
/* this sets all hovered lists to red */
#nav li:hover a,#nav  li.over a,
#nav li:hover li a:hover,#nav li.over li a:hover {color: #700000;background-color:#D8D8D8;width:89px;font-family:Verdana, Arial, Helvetica, sans-serif;}
#nav li a span.down {color:#CC6600; }
/* set dropdown to default */
#nav li:hover li a,#nav li.over li a {color: #FFFFFF;background-color: #700000;text-align: inherit; }
#nav li ul li a { padding: 5px 5px; } /* Sub Menu Styles */
#nav li:hover ul,#nav li.over ul {margin-left:0; } /* show menu*/
hr{background:#FFEBCD;}
ul{list-style-type:none;margin:0;padding:0;}
li{display:inline;font-family: Verdana, Arial, Helvetica, sans-serif;}
ul.a{display:block; font-family: Verdana, Arial, Helvetica, sans-serif; color: #009966;}
.header{padding-left:15px;}
.nortext { font-family:Arial, Helvetica, sans-serif; font-size:13px; color: #333333; line-height:18px; padding:10px; text-align: center;}
.textheading { font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#990033; line-height:10px; padding-left:120px; text-decoration:underline;}
</style>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor=" #FFFFFF">
  <tbody><tr>
    <td>
     <table width="800" border="0" cellspacing="0" cellpadding="0"  bgcolor="#700000" align="center" >
     <tr>
      <td align="center" class="img1" height="40" ><img src="Images/download (7).jpg" height="30" width="40" align="left"/></td>
      <td  class="header" align="center" ><font style="font-family:Geneva, Arial, Helvetica, sans-serif; font-size:25px; color: #D8D8D8 ;">TourDe Chennai Welcomes</font></td>
      <td align="right" valign="top" class="img"><img src="Images/facebook" height="20" width="25"/>&nbsp;<img src="Images/Twitter-icon.png"height="20" width="25"/>&nbsp;<img src="Images/orkut1"width="25" height="20"/>&nbsp;</td>
     </tr>
    </table>
    <table bgcolor="#FFFFFF" width="800" cellpadding="0" cellspacing="0" align="center">
    <tbody>
    <tr><td>
    <table cellpadding="0" cellspacing="0" width="800" align="center">
     <tbody><tr>
     <td align="center">
      <ul id="nav">
       <li><a class="down">Home</a></li>
       <li><a href="about.html">About</a>
      </li>
      <li><a href="">Online</a>
      <ul>
      <li>
      <a href="">Travel Booking</a>
      </li>
       <li>
      <a href="">Tour Booking</a>
      </li>
      </ul>
      </li>
      <li><a href="">Forms</a>
      <ul>
      <li><a href="">Booking</a></li>
      <li><a href="">Tour</a></li>
      </ul>
      </li>
      <li><a href="">Hotels</a>
      <ul>
      <li><a href="Accomidation.html">Accomidation</a></li>
      <li><a href="">Vehicles</a></li>
      </ul>
      </li>
      <li><a href="">TravilTips</a></li>
      <li><a href="">Contact Us</a>
      <ul>
       <li>
        <a href="">FeedBack</a>
       </li>
      </ul>
      </li>
     </ul>
  </td>
 </tr>
</tbody></table>
 </td>
 </tr>
   </tbody></table>
</body></html>

解决方案

You can get more responses, if you can clearly state what you want to achieve by increasing space by 1 px.


这篇关于间距问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆