我的标题div中有一个img(徽标超链接)和文本(超链接)。我想要的是图像的文本和底部边缘沿div的底部排列。现在我有一个100px高img和15px文本,文本沿着图像的中心水平对齐。
这是我的源代码html的样子
</head>
<body bgcolor="#660099">
<div class="gridContainer clearfix">
<div id="header">
<h1>
<a href="index.html"><img src="graphics_home/mini_logo.jpg" alt="the white dove woodstock" width="159" height="99" border="0" align="absbottom" /></a>
<a href="rooms.html" class="hlink">Rooms</a> <a href="todo.html" class="hlink">ToDo</a> <a href="about.html" class="hlink">About</a> <a href="bloc.html"class="hlink">Blog</a> <a href="shop.html" class="hlink">Shop</a> <a href="reservations.html" class="hlink">Reservations</a>
</h1>
</div>
这就是我的排版css的样子:
#header h1{
color: #cc0099;
font-family: 'victor_moscosoregular', mono;
font-size: 15px;
font-style: normal;
font-weight: normal;
margin-bottom: auto;
margin-top: auto;
word-spacing: .15 em;
}
a.hlink:link {
color: #cc0099;
text-decoration: none;
}
a.hlink:hover {
color: #cc99ff;
}
任何简单的想法我应该如何制作所有东西&#34; sit&#34;沿着HeaderDiv的底部边缘?
我会发布一张图片,但他们不会让我
答案 0 :(得分:0)
答案 1 :(得分:0)
//你的意思是这样吗
a:first-child{
position:relative;
display:block;
text-align:left;
color:#fff;
}
a:hover{
color:gold;
}