I thought I finally had a handle on CSS positioning, floats, clear, margin, padding, and all that.
Yet I keep running into a gotcha here, there, and oops, over there, and it's getting me frustrated. I could use some advice.
Example Web1: (HTML5, CSS3, SVG1.1)
http://www.shinyfiction.com/themes/hc01 … index.html
The article element has a horizontal margin of 5% and padding of 16px to accommodate a box-shadow and provide blank space between the text and the background-color. Within that, the aside sidebar on the left is of width: 17.5% and the section is of width: 75.00%. Both elements float left and have margin: 8px and padding: 16px, with the intention providing blank space again. Specifically, I typically don't want the blocks to be right next to each other without a gutter separating them, especially for this design.
All well and good, right? There's 7.5% space between the blocks, which ought to more than account for the margins and padding. As nearly as I can tell, padding seems to *add* to the box width, instead of being an inset within it, but of that, I'm not sure. In any case, past some point, such as on an iPad or window size smaller than about 1024px, the section box bumps down past the bottom of the aside. Float left and float right both do this.
But I want the two blocks always at the same level, and I don't understand what I'm missing in my knowledge, that I keep tripping over things like this. If the percentages are always less than 100%, whatever amount that margin and padding add, why do the blocks float down instead of remaining on the same level in a proportional layout?
Yes, there are times I want elements within a section, say, to float down as needed.
I'm obviously missing something, and it's aggravating. I'd appreciate advice. Thanks in advance.
Writing, Editing, Artwork, Audio, and soon Fonts