CSS Training in Facebook Chat
This is lifted from a Facebook chat I had with a friend as I talked him through the basics of CSS.
So, when you’re coding, you can only code down the page right? But your CSS can make images/areas appear wherever on the actual web page
So you need to keep the constraints of the HTML in place as you code and remember to think of the final page so you’d have something like:
< div id= "sidebar_right" >
Content
< /div >
< div style= "margin-top: -30px; margin-left: 20px; ">
< img src="picture.jpg" />
div >
< div style = "margin-top: -50px; margin-left: 20px; ">
< img src ="picture2.jpg" />
div >
I had to add in lots of spaces to get the code to appear on this page. This text is to be used as an example.
You have to give the pictures negative top margins so that you can pull them up the page instead of being below the sidebar.
The margin-left will move the images to the left of the item to the left of it
Adjust the numbers as needed
Make sense?
Do you know the difference between class and id in CSS?
- id is where identify the div like
Archives
- February 2012 (5)
- January 2012 (19)
- December 2011 (15)
- November 2011 (19)
- October 2011 (17)
- September 2011 (29)
- August 2011 (33)
- July 2011 (24)
- June 2011 (10)
- May 2011 (12)
- April 2011 (5)
- March 2011 (5)
- February 2011 (9)
- January 2011 (15)
- December 2010 (15)
- November 2010 (21)
- October 2010 (20)
- September 2010 (32)
- August 2010 (33)
- July 2010 (17)
- June 2010 (20)
- May 2010 (14)
- April 2010 (21)
- March 2010 (13)
- February 2010 (29)
- January 2010 (38)
- December 2009 (13)
- November 2009 (5)
- October 2009 (7)
- September 2009 (9)
- August 2009 (16)
- July 2009 (17)
- June 2009 (15)
- May 2009 (20)
- April 2009 (30)
- March 2009 (17)
- February 2009 (21)
- January 2009 (24)
- December 2008 (27)
- November 2008 (33)
- October 2008 (35)
- September 2008 (32)
- August 2008 (30)
- July 2008 (11)





