May 14, 201214 yr Hi there. I'm mucking about, trying to get my head around fluid sites (and the awesomeness that is LESS) and I've stumbled on a problem I can't seem to fix. Here's the problem If you resize your browser to around 900px, you'll see the images on the right overflow their container. I think it's doing it because the "post" container only stretches so far and the way I've set them up (to keep them equal height) means the sidebar wont stretch any taller than the post container. The only way I can think of fixing it is to set a height using media queries but that is the sux Help would be ever so well received! Cheers, ~evu.
May 14, 201214 yr 1. Remove these from .sidebar: position: absolute; right: 0; 2. Change .main from width:72% to width:70%
May 15, 201214 yr Author Hi Jack, cheers for the reply. Unfortunately it doesn't help. Well, it does fix it, but the reason I had position: absolute and right: 0 was to keep the sidebar the same height as the "post" container. I've changed it, removed position: absolute, and now if you take a look and resize your browser to around 754px you'll see the post container stretches further than the side bar. I've made the background darker so it's easier to see. Fist chance I had at seeing colour differences on a mac this, too And the width: 72% was just there while I was tinkering with something else Cheers, ~evu.
May 15, 201214 yr Hmm, thought I fixed it in inspector then but apparently not. Float:right isn't allowing height:100% to work... Edited May 15, 201214 yr by jackwebdale
May 17, 201214 yr Author These sort of issues lead me to think there should be a css property for this. Or at least making height: 100% take effect with regards to it's parent container. Even if the parent container doesn't have a specified height, at run time it gets a height from the content within it. Bloody confusing if you ask me... The only fix I can think of resorts to using background images, faux column style. ~evu.
May 17, 201214 yr You've got fixed widths for the images on the right <li><a href=""><img src="http://lorempixel.com/300/300/abstract/10" alt="" width="300" height="300" /></a></li> so when there's not enough width, first the become only one above the other instead of in pairs, then th ewhole div drops down. You would do better to make everything, including images, margins, padding etc. % widths. Media queries can do this by making images max-width: 100%; see http://kyleschaeffer.com/best-practices/responsive-layouts-using-css-media-queries/
May 17, 201214 yr Author As far as I was aware it was always good practise to set the widths of the images(src) in HTML. Those get overrided by my CSS. If you now look at the page the first 3 images no longer have a html width attribute, the last three still do. Those no longer fill thier parent container, the images are set to max-height and width already. It was my attempt at fluid images. The reason they change from stacking to 2-up is because I've set them like that with media queries Cheers, ~evu.
May 18, 201214 yr Sorry, I didn't look at your stylesheet before posting above. I think you are bound to have one column lower than the other with a fluid layout unless you can integrate equal height columns as shown here http://matthewjamestaylor.com/blog/equal-height-columns-2-column.htm for the normal situation. The two columns for equal height would be #main which is 70% wide but has no background at the moment and #sidebar which is 30% wide. You have a lot of media queries for different widths and you are probably trying to achieve too much. At 620px the #sidebar drops down below #main as it's supposed to do because of the media query has width: 100% in that query. You might do better to delete all the other media queries and just have a normal situation with both columns the same height and the 620px media query to drop the #sidebar down. Edited May 18, 201214 yr by Wickham
Create an account or sign in to comment