5 replies [Last post]
benny
Offline
Enthusiast
Last seen: 14 years 37 weeks ago
Joined: 2004-08-24
Posts: 64
Points: 0

Hi,

i've the following prob.:

i have a #inhalt

#inhalt {
background-image: url(inhalt_background.gif);
background-repeat: no-repeat;
background-position: left;
background-color: #F9F9F9;
float: left;
height: 550px;
width: 725px;
}

In this content, i want to place a #news with relative positioning.

#news {
background-color: Blue;
position: relative;
top: -50px;
left: 650px;
width: 100px;
height: 200px;
}

The problem is, that the text displayed in #inhalt is covered by the #news, but i want the text to flow the #news.

Can you help me ?
If you need the whole css, say and i'll post it.
thank ya very much,
greets ben

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 9 weeks 3 days ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

Positioning-problem

You could try either typing the text in the #news section, or give the #news div a lower z-index, such as -4 or something. Play around with it.

Verschwindende wrote:
  • CSS doesn't make pies

flash.pro
Offline
Regular
Groningen/Assen - The Netherlands
Last seen: 17 years 42 weeks ago
Groningen/Assen - The Netherlands
Joined: 2004-09-09
Posts: 14
Points: 0

Positioning-problem

The position relative tells the div #news to not look at other divs exept its parent and place itself at a certain position. Offcourse it will cover #Inhal's content (read: text) because it isn't the parent. The div is it's parent not the text.

To achieve the effect you want i presume you mean it will float left or right. Just try to just float the #news box left or right. With a margin the text will nicely float around the #news div.

I hope i made it clear for you...

Edwart Visser
Designer

Wisdom TMLC
www.wisdomtmlc.com

benny
Offline
Enthusiast
Last seen: 14 years 37 weeks ago
Joined: 2004-08-24
Posts: 64
Points: 0

Positioning-problem

hey guys,
thx for ya answers, i'll try that tomorrow.
Does someboy of you know a good resource where css positioning is explained well ?
I've read some chapters in some books about it, but they weren't really helpfull to me.

Thank ya again,
greets ben

flash.pro
Offline
Regular
Groningen/Assen - The Netherlands
Last seen: 17 years 42 weeks ago
Groningen/Assen - The Netherlands
Joined: 2004-09-09
Posts: 14
Points: 0

Good CSS positioning resource

this can help you finding out more abouot positioning in CSS:

http://www.positioniseverything.net/articles/flow-pos.html

Edwart Visser
Designer

Wisdom TMLC
www.wisdomtmlc.com

benny
Offline
Enthusiast
Last seen: 14 years 37 weeks ago
Joined: 2004-08-24
Posts: 64
Points: 0

Positioning-problem

thank ya very much, really a good site!
greets,
ben