混合宽度和定位 [英] mixed widths and positioning

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

问题描述

我正在开发一家餐馆的网站。

http://www.tsmchughs.com/


我的模板有div#content然后div#navigation,其中包含

无序列表的链接。我已使用以下内容定位div#navigation左侧

方:


BODY {

margin-left:9.6em ;

}


#navigation {

职位:绝对;

宽度:9em;

身高:100%;

top:0;

底部:0;

左:0;

}


我想在div#navigation中添加一个图形,一个140px宽的gif文件。

我画过吗我自己陷入了困境?如何将图像放在

#navigation中,并确保

图像和文本链接有足够的空间?


-

Brian

按照我地址中的说明给我发电子邮件

I''m developing a restaurant''s website.

http://www.tsmchughs.com/

My template has div#content then div#navigation, which contains an
unordered list of links. I have positioned div#navigation on the left
side using the following:

BODY {
margin-left: 9.6em;
}

#navigation {
position: absolute;
width: 9em;
height: 100%;
top: 0;
bottom: 0;
left: 0;
}

I''d like to add a graphic to div#navigation, a 140px wide gif file.
Have I painted myself into a corner? How can I place the image in
#navigation and be sure that there is adequate space for both the
image and the text links?

--
Brian
follow the directions in my address to email me

推荐答案

Brian< us ***** @ julietremblay.com.invalid-remove-this-part>在消息新闻中写道:< jkwsb.134066
Brian <us*****@julietremblay.com.invalid-remove-this-part> wrote in message news:<jkwsb.134066


275.396634@attbi_s53> ...
275.396634@attbi_s53>...
我想添加一个图形到div#navigation,一个140px宽的gif文件。
我是否已将自己画成一个角落?如何将图像放在
#navigation中并确保
图像和文本链接有足够的空间?
I''d like to add a graphic to div#navigation, a 140px wide gif file.
Have I painted myself into a corner? How can I place the image in
#navigation and be sure that there is adequate space for both the
image and the text links?




您可以这样做:


< div id =" navigation">


< img src =" foo"> ;


< ul> ...文字链接...< / ul>


< / div>


如果9em<你可能遇到麻烦; 140 px,这取决于用户的设置。


Garmt。



You can just do:

<div id="navigation">

<img src="foo">

<ul> ...Text links... </ul>

</div>

You could get into trouble if 9em < 140 px, which depends on the user''s settings.

Garmt.


Garmt de Vries写道:
Garmt de Vries wrote:
Brian< us ***** @ julietremblay.com.invalid-remove-this-part>在消息新闻中写道
:< jkwsb.134066
Brian <us*****@julietremblay.com.invalid-remove-this-part> wrote
in message news:<jkwsb.134066


这篇关于混合宽度和定位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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