【发布时间】:2011-04-01 19:23:58
【问题描述】:
我有一个位于页面中心的标题图形,在中心它会根据窗口大小移动,但是我想在它下面放置一些按钮,这些按钮锚定在标题的左侧,以便当标题移动时,按钮总是从标题图形的左下角开始显示。
这可能吗?
这是我在 html 中的内容:
<div id="header"> <p class="centeredImage"><img src="supt_files/main_back.jpg" width="804" height="116" border="0" alt=""></p> <div id="centretext"> <a href="#How"><button style="background-color: SlateGrey" type = "button" onmouseover="style.backgroundColor='DarkGoldenRod';" onmouseout="style.backgroundColor='SlateGrey'"> How Do I... </a></button> <a href="#Servers"><button style="background-color: SlateGrey" type = "button" onmouseover="style.backgroundColor='DarkGoldenRod';" onmouseout="style.backgroundColor='SlateGrey'"> Servers </a></button> <a href="#Sign"><button style="background-color: SlateGrey" type = "button" onmouseover="style.backgroundColor='DarkGoldenRod';" onmouseout="style.backgroundColor='SlateGrey'"> Significant services </a></button> </div> </div> <!-- Header -->
在css中:
#header{ 宽度:100%; 高度:157px; 位置:相对; 顶部:0px; 背景色:SlateGrey; }
#centretext{ 文本对齐:居中; }
【问题讨论】:
-
是的,这听起来可能。您能否展示您目前正在使用的代码,以便我们无需编写自己的模型代码即可提供答案?