SimWhite
(SimWhite)
May 15, 2015, 8:37am
1
Hello. Please help me. I need to set image to the top right corner of container. When I try to set “Float: Right” headings is move to left. How can do it without moving headings?
https://dl.dropboxusercontent.com/s/zvclduzqfrj8slg/Screenshot%202015-05-15%2013.37.34.png?dl=0
Also, when I try to set image to absolute it is positioned relative to whole browser window instead of container.
vincent
(Vincent Bidaux)
May 15, 2015, 9:02am
2
Only use float when the soldiers are at your door
Here you don’t need float, it’s not made for that.
You need ABSOLUTE position, top right. An absolute positioned element will be positionned regarding it’s CLOSETS POSITIONNED PARENT.
So
start by giving the parent, the container, position:relative. it changes nothing but now it’s “positionned”
give your corner element position:absolute and click to upper right corner button.
Now it should stick on that corner like a superglued-on-the-ceiling salaryman
2 Likes
SimWhite
(SimWhite)
May 15, 2015, 10:49am
3
Got it! I forget about position:relative for container. Thanks a lot!
1 Like
system
(system)
Closed
May 22, 2015, 10:49am
4
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.