CSS question for www.squeak.org

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

CSS question for www.squeak.org

karl-8
I'm thinking of adding a small News box on www.squeak.org but I can't
figure
out a CSS issue. I have a menu wich is defined like this:

#menu {
  position:absolute;
  top: 75px;
  left: 10px;
  width:110px;
  padding:10px;
  background-color:#eee;
  border:1px dashed #999;
  line-height:17px;
}

Below that menu box I would like to display the news box but the menu
box changes in height.
How do I tell the news box to position it self about 20 pixels below the
bottom of the menu box ?

#news {
  position:absolute;
  top: ?????; menu bottom + 20 px
  left: 10px;
  width:110px;
  padding:10px;
  background-color:#eee;
  border:1px dashed #999;
  line-height:17px;
}

Karl


Reply | Threaded
Open this post in threaded view
|

Re: CSS question for www.squeak.org

Sylvain pralon
Hi

I am a newbie in smalltalk but I have a good experience in CSS !
Your problem is a classic one. The problem comes from the fact your
positions are absolute.
So if the menu div changes the news div don't care !

Solution :
* position : relative for the both div
* for the news div -> margin-top : 20px;

try this, I think it will work, if not tell me !

sylvain

> I'm thinking of adding a small News box on www.squeak.org but I can't
> figure
> out a CSS issue. I have a menu wich is defined like this:
>
> #menu {
>  position:absolute;
>  top: 75px;
>  left: 10px;
>  width:110px;
>  padding:10px;
>  background-color:#eee;
>  border:1px dashed #999;
>  line-height:17px;
> }
>
> Below that menu box I would like to display the news box but the menu
> box changes in height.
> How do I tell the news box to position it self about 20 pixels below
> the bottom of the menu box ?
>
> #news {
>  position:absolute;
>  top: ?????; menu bottom + 20 px
>  left: 10px;
>  width:110px;
>  padding:10px;
>  background-color:#eee;
>  border:1px dashed #999;
>  line-height:17px;
> }
>
> Karl
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: CSS question for www.squeak.org

karl-8
Sylvain pralon skrev:

> Hi
>
> I am a newbie in smalltalk but I have a good experience in CSS !
> Your problem is a classic one. The problem comes from the fact your
> positions are absolute.
> So if the menu div changes the news div don't care !
>
> Solution :
> * position : relative for the both div
> * for the news div -> margin-top : 20px;
>
> try this, I think it will work, if not tell me !
>
> sylvain
Thanks. The whole page is designed using absolute positioning, so it seems
the style script needs a overhaul...
Karl

>> I'm thinking of adding a small News box on www.squeak.org but I can't
>> figure
>> out a CSS issue. I have a menu wich is defined like this:
>>
>> #menu {
>>  position:absolute;
>>  top: 75px;
>>  left: 10px;
>>  width:110px;
>>  padding:10px;
>>  background-color:#eee;
>>  border:1px dashed #999;
>>  line-height:17px;
>> }
>>
>> Below that menu box I would like to display the news box but the menu
>> box changes in height.
>> How do I tell the news box to position it self about 20 pixels below
>> the bottom of the menu box ?
>>
>> #news {
>>  position:absolute;
>>  top: ?????; menu bottom + 20 px
>>  left: 10px;
>>  width:110px;
>>  padding:10px;
>>  background-color:#eee;
>>  border:1px dashed #999;
>>  line-height:17px;
>> }
>>
>> Karl
>>
>>
>>
>
>
>
>