I am trying to accompish with CSS what I used to accomplish with HTML nested tables. Basically it is a simple one column, two row table with a header row and body row. Last night was my first experience with CSS so bear with me.
My test run is located at: <!-- m --><a class="postlink" href="http://www.suspendedmoment.com/css/test.html">http://www.suspendedmoment.com/css/test.html</a><!-- m -->
The CSS file is located at: <!-- m --><a class="postlink" href="http://www.suspendedmoment.com/css/test.css">http://www.suspendedmoment.com/css/test.css</a><!-- m -->
Is this the proper way to achieve the same effect? I noticed that if you nest a DIV tag within a DIV tag that the nested DIV is placed one pixel below and one pixel to the right of the DIV its contained within. Therefore I set the postion to top:-1 and right:-1. Then I added padding of 5px which shifted it again so i changed it to top:-6 and right:-6. Finally the padding made the outter DIV stretch to 160 pixels so I had to make the inner DIV 160 pixels. Is this all making sense? Am I doing this the hard way or is the considered the correct way, if there is one?
Thanks for your input...
Rich S.good start, but you don纾
My test run is located at: <!-- m --><a class="postlink" href="http://www.suspendedmoment.com/css/test.html">http://www.suspendedmoment.com/css/test.html</a><!-- m -->
The CSS file is located at: <!-- m --><a class="postlink" href="http://www.suspendedmoment.com/css/test.css">http://www.suspendedmoment.com/css/test.css</a><!-- m -->
Is this the proper way to achieve the same effect? I noticed that if you nest a DIV tag within a DIV tag that the nested DIV is placed one pixel below and one pixel to the right of the DIV its contained within. Therefore I set the postion to top:-1 and right:-1. Then I added padding of 5px which shifted it again so i changed it to top:-6 and right:-6. Finally the padding made the outter DIV stretch to 160 pixels so I had to make the inner DIV 160 pixels. Is this all making sense? Am I doing this the hard way or is the considered the correct way, if there is one?
Thanks for your input...
Rich S.good start, but you don纾