Wednesday, March 12, 2008

CSS Positioning - Some pointers

1. Absolute Absolute positioning is absolute in relation to the parent element. In this case the parent element is the whole document, so the div is positioned absolutley at 0,0 and will apear in the top left corner.

2. Relative This positions the element relative to where it would have been in the document. Useful for moving something down or across a few pixels for example. In the diagram, the black dashed outline shows where the div would have been without positioning.

3. Relative and Absolute An example of absolute and relative positioning. The outer green box is positioned relative to where it would have been, whilst the inner box is positioned absolutely in relation to the parent green box.

4. float This is where the element in question "hovers" left or right, much like aligning an image left or right works in plain HTML.

6. 3 Column layout Here's where it gets fun. Below is a classic 3 column layout with the left and right DIV floated correspondingly left and right, and the middle DIV without any positioning at all.

Link to me!

If you use any of the code on this site (and if you don't I guess) or it makes your life easier, I'd appreciate a backlink. The more traffic I get, the more people I can annoy... :-)

About Me

Hello! I am S.M. Saidur Rahman (Rana) Currently i am working at Sumcynet Limited as a Senior programmer. It is my own site. The main reason which has forced me to publish this site is to expose myself to the world. I think my effort will be successful if this site benefits you a bit.

In this site you will get different type of helps concerning computer related problem. You will find different solutions of programming and other problems which are mainly encountered in developing professional software design. This site also contains different software tools designed by me. I also highly encourage you to post your different ICT (Information and Communication Technology) based queries. I will try the best to answer your queries.

Here is a comprehensive list what I am and What I am not, what I like and what I dont. I hope you will enjoy.

  • I dont like tell lie any more
  • I like to sleep too much, but I usually dont get much time for that
  • I love songs from Sonu Nigam and other clasical singer.
  • I wish that I could be a PHP Fanatic
  • I love eating Khichuri with fry (Fish or Meat)
  • I dont like lazy peoples, thought I am one of them.
  • I love reading classics novels
  • I am a Computer Engineer