|
Post by Brett Ludwick on Mar 8, 2015 11:22:54 GMT -8
This week was particularly challenging in terms of centering elements within a fluid layout and aligning a background image to my container. My goal was to center the images in the far right column within the background image. Even though all the padding and column percentages added up to 100%, I always saw a space in Dreamweaver between the 2nd and 3rd columns. I tried several different percentages and configurations for padding, margins, etc. It would work at full window size, then butt up against the right or left when making the window smaller (or vise-versa). Also, I ran up against a problem that I have had in the past: that pesky space between the header and the nav bar that I couldn't get rid of using "0" top and bottom margins etc. So my biggest source of frustration and my biggest problem is having spacing where I don't want it, and a lack of spacing when I do want it. I wish I could have gone to the "open session" on Thursday to get a handle on all this. Assignment 8
|
|
|
Post by Judy Fontanella on Mar 10, 2015 17:13:18 GMT -8
You page really looks beautiful. Your graphics are outstanding. The page is resizing well, too.
I did not figure out what was causing the gap between your header and nav sections, but I do know how to fix it. It's by putting the image in as a background image, and sizing the .imgWrap div around it so that it's flexible. You have to remove the image as a foreground image. Then make this rule for the imgWrap div: .imgWrap { width:100%; height:0; padding-bottom:16.7%; background: url(images/unit_8_header.jpg) no-repeat; background-size: 100% 100%; } The 16.7% figure for the padding on the div is the proportion of your background image's height to its width. If you do this, you'll see that the background image stays in proportion and adjusts to the size of the window.
I don't see the gap between your columns that you talked about. Maybe because you don't have different background colors, so I can't address that. You could try the box-sizing property with border-box as the value. That might make calculations simpler for the browsers, as well as yourself.
|
|