Absolute relative CSS

Permalink
I bet this is a total noob question... I'm very new to the details of css... and Concrete5 for that matter. (but not new enough to forget to search before asking :)

So in creation of a block, in my view.css file, how do I create a 'div' with a class that uses absolute positioning that is relative to the confines of the block itself. I've seen examples such as in tab 4 of the following example:http://www.barelyfitz.com/screencast/html-training/css/positioning/...

They create a div that does absolute positioning relative to another block?

I have 2 divs, only one is visible at a time, but whichever one is visible, it needs to be displayed in the left left most corner of my custom block. Right now the block is being drawn in the upper leftmost corner of the browser well outside the confines of the block.

v {
visibility:visible;
position:absolute;
top:0;
left:0;
width:320px;
}
h {
visibility:hidden;
position:absolute;
top:0;
left:0;
width:320px;
}

Anyone? Thanks
-Steve

sday
 
sday replied on at Permalink Best Answer Reply
sday
Ha, that was noob. Just figured it out.

make another css say:

.r {
visibility:visible;
position:relative;
top:0;
left:0;
width:320px;
}

Then do:

<div id="L" class="r">
<div id="L0" class="v">
</div>
</div>

that was easy. Maybe this will help someone else who missed the obvious at first glance.