文字和图片 [英] Text and Pic

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

问题描述

新来的。


我正在设计一个网站。有问题的页面左侧有一个导航栏占据屏幕的15%

。一个标题,包含一个居中的图形,需要大约

200px。


我想要的是在右边缘有一张图片而文字没有去

通过图片,就像现在一样。我想出了如何做到这一点,但我忘记了b $ b忘了。


这是我到目前为止的CSS。除了通过图片的文字,

它看起来是正确的。


div.pcontent {


的位置:绝对;

最高:200px;

剩余:20%;

宽度:80%;


}

div.photoright {


职位:绝对;

top:200px;

右:0;

填充:1em;


}


帮助?

解决方案

如果有任何帮助,请点击这里的页面:
http://www.opro.org/newdesign/nsbio.html


而css是在 http://www.opro.org/newdesign/default .css


看起来是正确的,如果只有文字会在图片前包裹......


Neal <是ne ** @ spamrcn.com>在消息中写道

news:bp ********** @ bob.news.rcn.net ...

新来的。

我正在设计一个网站。有问题的页面左侧有一个导航栏占据屏幕的15%。一个标题,包含一个居中的图形,需要大约200px。

我想要的是在右边缘有一张图片,而文字没有在图片中显示
现在呢。我想出了如何做到这一点,但我忘了。

这是我到目前为止的CSS。除了通过图片的文字,
它看起来是正确的。

div.pcontent {

位置:绝对;
顶部:200px;
left:20%;
宽度:80%;

}

div.photoright {

位置:绝对;
顶部:200px;
正确:0;
填充:1em;

}

帮助?


* Neal *< ne ** @ spamrcn.com>:


我想要的是拥有一张照片在右边缘和文本没有像现在一样通过图片。




这是float:right的完美用法。 。这需要''img''

在正确的容器中。


-

Hitchhiker' 银河系指南:

宇宙,如前所述,是一个令人不安的大地方,

a为了安静的生活人们倾向于忽略。


" Christoph Paeper < CR *********** @ gmx.net>在消息中写道

news:bp *********** @ ariadne.rz.tu-clausthal.de ...

* Neal *< ; ne ** @ spamrcn.com>:


我想要的是在右边缘有一张图片而且文字没有在图片中显示
现在。
这是float:right的完美用法。这要求



''img''在正确的容器中。

-
Hitchhiker的指南银河系:
宇宙,就像之前所观察到的那样,是一个令人不安的大地方,这是一个事实,为了一个安静的生活,大多数人都会忽视这一点。




我的意见是什么?


Hi, new here.

I''m designing a site. The page in question has a navbar on left taking 15%
of the screen. A header, containing a centered graphic, requires about
200px.

What I want is to have a picture on the right margin and the text not go
through the picture, as it does now. I figured out how to do this, but I
forgot.

Here''s the CSS I have so far. Other than the text passing through the pic,
it looks right.

div.pcontent {

position: absolute;
top: 200px;
left: 20%;
width: 80%;

}
div.photoright {

position: absolute;
top: 200px;
right: 0;
padding: 1em;

}

Help?

解决方案

If it''s any help, here''s the page in question:
http://www.opro.org/newdesign/nsbio.html

And the css is at http://www.opro.org/newdesign/default.css

Looks right, if only the text would wrap before the picture...

"Neal" <ne**@spamrcn.com> wrote in message
news:bp**********@bob.news.rcn.net...

Hi, new here.

I''m designing a site. The page in question has a navbar on left taking 15%
of the screen. A header, containing a centered graphic, requires about
200px.

What I want is to have a picture on the right margin and the text not go
through the picture, as it does now. I figured out how to do this, but I
forgot.

Here''s the CSS I have so far. Other than the text passing through the pic,
it looks right.

div.pcontent {

position: absolute;
top: 200px;
left: 20%;
width: 80%;

}
div.photoright {

position: absolute;
top: 200px;
right: 0;
padding: 1em;

}

Help?



*Neal* <ne**@spamrcn.com>:


What I want is to have a picture on the right margin and the text not go
through the picture, as it does now.



This is the perfect usecase of "float: right". That requires that the ''img''
is in the correct container, though.

--
The Hitchhiker''s Guide to the Galaxy:
"The Universe, as has been observed before, is an unsettlingly big place,
a fact which for the sake of a quiet life most people tend to ignore."


"Christoph Paeper" <cr***********@gmx.net> wrote in message
news:bp***********@ariadne.rz.tu-clausthal.de...

*Neal* <ne**@spamrcn.com>:


What I want is to have a picture on the right margin and the text not go
through the picture, as it does now.
This is the perfect usecase of "float: right". That requires that the


''img'' is in the correct container, though.

--
The Hitchhiker''s Guide to the Galaxy:
"The Universe, as has been observed before, is an unsettlingly big place,
a fact which for the sake of a quiet life most people tend to ignore."



What would you suggest in my case?


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

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