You have done everything right (according to the suggestions in my previous post) but with a small difference:
<div id="container" runat="server">
The difference is runat="server"
attribute that you have added.
Because of this attribute
the server changes the id of this div on page render. The rendered html code in your case is:
The css properties for div with id="container" don't apply because the div with id="container" doesn't exist.
You have to remove runat="server"
from this div in the masterpage.
Alternatively, if you want to leave runat="server"
, you need to change the id
attribute with a class
<div class="container" runat="server">
In this case you need to change the css selector, too:.container
instead of #container