5 replies [Last post]
linux4me
Offline
newbie
Last seen: 12 years 39 weeks ago
Joined: 2008-03-04
Posts: 3
Points: 0

Hi all..

Must say i'm prety neewbe to css..

But i hope to learn Wink

ok here's the deal..

I have 2 divs..

1 wrapper and 1 content..
But, the problem is that the wrapper do not follow the content-div as it strech vertical..

See here: http://webinferno.net/tester/csstest/test_div.php

the css are in the page source..

but i can post here as well Wink

#wrapper{ background-color:#FFF; border: 2px solid #CCC; width: 967px; margin-left: auto; margin-right: auto; min-height:400px; height: 100%; padding: 0px;

}

#maincontent{
background-color:orange;
top: 20px;
position:absolute;
right:155px;
width: 686px;
min-width:120px;
height:auto;
min-height:400px;
align:right;

}

hope that someone can explane this to me..

Best regards..

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 8 years 10 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

That is the whole purpose of

That is the whole purpose of position:absolute, it takes the element away from its parent and displays it exactly where you tell it to.

You might want to take a look at the tutorials on CSS at htmldog, they will get you started on CSS and provide a place for you to check out what happens with certain properties. For now, my best advice is to steer clear of position (absolute, relative, fixed) until you are more experienced with building a page "in-flow", that is letting the browser do the work. Mostly it'll do a pretty good job. Once you are familiar with that job, you'll know when you need to use position to make it do things differently.

linux4me
Offline
newbie
Last seen: 12 years 39 weeks ago
Joined: 2008-03-04
Posts: 3
Points: 0

Thanx's for the reply, but

Thanx's for the reply, but the link you suggested ain't working so well..

ifohdesigns
ifohdesigns's picture
Offline
Enthusiast
Providence, RI
Last seen: 9 years 11 weeks ago
Providence, RI
Timezone: GMT-4
Joined: 2008-02-22
Posts: 269
Points: 0

The link works fine and

The link works fine and dandy...you might actually have to read a bit.

mattrossidesigns.com

linux4me
Offline
newbie
Last seen: 12 years 39 weeks ago
Joined: 2008-03-04
Posts: 3
Points: 0

sorry, but nope.. The link

sorry, but nope..

The link don't work fine and dandy..

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 8 years 10 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

What country are you in?

What country are you in? http://www.htmldog.com works just fine where the internet is unimpeded. Do an "nslookup www.htmldog.com" from your command line (that will work in all major OS, e.g. Windows, OSX, Linux & FreeBSD), the answer you should receive is 217.77.176.25.