Margins in a div aren’t working properly
I’m making some experiments with a simple fluid grid only with a sidebar and a main area. When I try to put some margins in an div inside the main area, the margin doesn’t work properly, but in the sidebar it works fine. Here is the Jsfiddle: http://jsfiddle.net/swayziak/vVJeV/
Probably the problem is related with some part of the .sidebar and .mainarea CSS, but I don’t know which one.
Here is your answer.. Example here.
Your problem was that the sidebar was taking up 25%, and the mainarea was 75%.. This would normally work, however, you had a
border-right of 1 px.. Therefore the total adds up to 101%..
These are the changes I made:
Let me know if you need anymore help, or if you have any additional questions.