Hi Paul - sorry I just copied your code for sidebar
.sidebar{width:220px;}
and forgot to add the display table cell. I’ve clicked it now, you define the table then tell the elements inside that they’re table cells.
border-spacing - 20px
problem is it added 20px space to the left of content as well. I need as much blog space as possible.
You can add padding inside the cell
thank you! I added a padding-left to sidebar. The logic is always so obvious when you say it (no margins on table cells) but it’s hard for me to think of every little logical thing when doing it!
(1) The sidebar does not obey 0 auto and displays on the left instead of in center, when it drops below content
@media screen and (max-width:780px){
#container,#content{width:auto;display:block;margin:0 0 20px;}
#sidebar{margin:0 auto;}}
(2) Really funny problem. I decided to put each banner ad in a box, and now the banner suddenly grows bigger!
This is the size it should be (250px wide banners):
This is how it displays when I put it in a box (as you can see it also pushes away the padding between sidebar & content):
(3) I want to get the sidebar down to 310px max width so when it drops down it fits within iphone viewport (320 but I like that spare 5px on each side). Currently I have:
- width:290px;padding-left:20px = 310
- images of 250px (when they display at their right size!) with 0px L/R margin or padding
- inside a box with 0px L/R margin or padding
So it should fit but google complains that sidebar falls outside the viewport:
http://www.google.com/webmasters/tools/mobile-friendly/?url=http%3A%2F%2Fdev.greensmoothie.com%2F
Google says: “The page content is 482 CSS pixels wide, but the viewport is only 320 CSS pixels wide. The following elements fall outside the viewport:…” [and then it names all the sidebar elements]
How does google get 482 when I get 310?
thank you! - Val - latest at http://dev.greensmoothie.com/