English 中文(简体)
如何将案文置于导航“div”中
原标题:How to position text in a navigation "div."
  • 时间:2012-05-19 22:32:57
  •  标签:
  • css
  • html

OK. Thank you for giving me your precious time to look over this problem.

基本上,我有一个“div”,在我的航道的屏幕上使用。 它是一条简单的航道,只有80%的“div”大体,有些案文改变了对 h的肤色。

我提出的问题是:案文自动从“div”的顶端开始,我想把这个问题集中起来。 我在“div s”等地尝试过间隙、dding、浮标、“div s”等。

我将在这里把该守则张贴在航行条码上,如果你知道如何固定,请让我知道?

成就

HTML CODE:

<div class="header">
            <ul>
                <li><a href="#">Home</a></li>
                <li><a href="#">Repairs</a></li>
                <li><a href="#">Tune up/ Viruses</a></li>
                <li><a href="#">System Builds</a></li>
                <li><a href="#">Cables</a></li>
                <li><a href="#">Contact us</a></li>
                <li><a href="#">Find us</a></li>
                <li><a href="#">Links</a></li>
               <!-- <li><a href="/"><img src="facebook.png"></a></li>   -->
            </ul>
    </div>

CSS CODE:

.header ul { margin:0px;}
        div.header
        {
            width: 80%;
            height: 40px;
            margin-top: none;
            margin-bottom: none;
            margin-left: auto;
            margin-right: auto;
            border-top: none;
            border-left: none;
            border-right: none;
            border-bottom: none;
            background-color:  #575757;
        }
        li
        {
            display: inline;
            font-family:  open sans,  arial;
            padding-right: 10px;
            padding-top: 10px;
            margin-left: 10px;
            font-size: 20px;
        }
        li a 
        {
            text-decoration: none;
            color: white;
        }
        li a:hover
        {
            color: #00ccff;
        }
最佳回答

You can use a bunch of things to vertically center an element.

一条线要素(例如,只有一条行文的标语)中最好的一条是<条码>-八<>。

Set Set code <

li { line-height: 40px; }
问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签