css help

top250

Member
Hello i i trying to add add block in my game but need some css help i have done this:

HTML:
#advert
{
position:absolute;
left: 50%;
margin-top: 120px;
margin-left: -622px;
}
end placed the link in the wrapper.html
placing is ok but the problem is when i lower screen resolution the banner moves to the middle of the screen.
so i need something to make positioning absolute

so i hoop one of you can help me whit this

grtz top250
 

Basti

Administrator
Staff member
Code:
#advert
{
position:absolute;
top: 120px;
right: 0;
}
that is telling you, 120px from the top, 0px from the right.
This however gives issues for resolutions smaller or equal to 1024. Advert is placed 30px or so over the content area
 

top250

Member
but is there no way to make them fixed on the right side next to the content
so the the banner stays next to the content no matter the resolution you use ??
 

Basti

Administrator
Staff member
For that you would need to recode the layout and make it bigger. Or something out of the head, which might going to work...
if you place the advert div within the header div.

Then use for the advert div css
position: absolute;
top: 0;
right: -160px;

and give your header div css a
position: relative;
 
Top