May 25, 201214 yr I'm trying to create a fluid 2-column layout where the width of the sidebar depends on an image that it contains. Actually, I can make the sidebar okay - and even make the underlying menu items fill it. However, I'm having problems with the other column - the main content. I want, going across the screen from left to right: border, sidebar, gutter, main content, border. The width of the borders and the gutter might be, say, 2%. The width of the sidebar depends on an image it contains and the main content takes up the rest of the space. With the main content, I can: 1) position of its left edge dependant on the width of the sidebar and the right edge dependant on the width of the main content; 2) fix the position of the left edge and put the right edge by the border What I want to do, but can't, is pin the left edge to the gutter and the right edge to the border. The icing on the cake would be equal length columns but I can live without that. Edited May 25, 201214 yr by altis
May 29, 201214 yr You can change the float of your main part to the left and then ad 2% margin from the left. That will give you the 2% gutter Cheers
May 30, 201214 yr Thanks, but that looks even worse: http://altis.org.uk/120529/ I think it is a better idea too put a div around your whole code and then give that a width of 100%; Then you can give main 80% or something and the other div 16%, then you still have the 2% gutter... Because things get ugly when they get bigger! I got a 1920x1080 resolution, but the site then huge from size! Maybe it is something to think about Cheers
Create an account or sign in to comment