What I want to achieve is:
- A left column on the left side of the screen with a width of 250px (containing the navigation)
- The content with a width of 900px shown on the right side of the navigation but in the middle of the remaining space (= full width-250px navigation).
The left column absolute positioned at (0,0), the body-element having a padding of 250px and the content-div of 900px having
margin-left: auto; and
margin-right: auto; to center it in the remaining space.
My question is, is this a good solution and if not in which scenario could it cause problems? I did it with position absolute because I had troubles getting it done otherwise. I imagine it should be something like this, but I can't figure it out:
But I think this would only work if I set the width of the container to the remaining horizontal space, but that depends on the width of the user's screen.
margin: 0 auto;