I do not understand about the use of css div position absolute and relative, please help difference between absolute and relative usage.
Most of the time, relative position is used to reset the boundary to the dimensions of a container. Elements inside the container with absolute position are offset from the container, not the page body or another container. This will stick a heading at the bottom right corner of a logo div: <html> <head> <style type="text/css"> #logo { height: 300px; position: relative; width: 300px; } #logo h1 { bottom: 0; right: 0; position: absolute; } </style> </head> <body> <div id="logo"> <h1>Heading</h1> </div> </body> </html> Code (markup):
These term have confused many people most of the time. Whenever you have more than one divisions which are placed one inside the another. Then you can actually position the inner divs by making them absolute positioning keeping the outer one as relative. Suppose you have an outer div and you make it relative. Then you can make the inner divs absolute and position them according to your needs. This situation arises mostly while making various sections like header, navigations, main content and footers in the websites. Hope you have got an idea by now.
Thanks all for your response , I'll try again. Case like this: I have a wrapper div, content div and sidebar div, wrapper does not conform to the sidebar or content.
What do you mean "conform"? If you mean it does not enclose the content and sidebar, try adding overflow: hidden; to the wrapper CSS
Most of the time, relative position is used to reset the boundary to the dimensions of a container. Elements inside the container with absolute position are offset from the container, not the page body or another container.