Positioning Selectors With Correct Dimensions That Scale On Different Screen Sizes
And the editable fiddle:
http://fiddle.jshell.net/userdude/TdNXD/16/
And in gray tones:
Now, as your comment indicates, you're trying to center the img in the middle of the right content area. In the above fiddles, it is in the middle... of that content area (a div#main I added). So if we take into account the width of the nav on the left of #main, you get:
Which in color is easier to see centering of the img if it's all in color:
The above does include a slight issue I noticed, in that when the window is resized, the poadding on the #menu narrows, which means the absolute width of the right border then becomes slightly wider than the left #main. It's probably not or barely noticeable (as in, maybe 6-10px), but I thought I'd mention it.
Other things to consider:
The layout breaks in IE7 and 8. It's worse in IE7, but in IE8 it's still pretty horrid. My thought is IE's lack of support for
display: table,min-width, and some special selectors likeinput[type](etc.) are the root cause, but I have not confirmed which need to be handled. If you have to support these versions, I would suggest using an IE conditional stylesheet to "fix" IE7/8's display, which will either involve usingfloattechniques (not recommended, but doable) or (shudder) replacing the semantic markup with actualtable` elements.You really need to go through the markup and stylesheet, and most of all take a look at some of the decisions I incorporated into the design. I modified the markup to be more semantic, so you'll see HTML5 elements like
section,aside,article, andnavin place of what was there before. I also wrapped some of the content inptags if I thought it appropriate. One thing I'm thinking now is that theStock Imagestext should probably be in ah2block, too, since that's not technically not paragraph text. Same goes forInput URLandGrid Dimensions, although those would probably fit asfieldsetandlegendcandidates due to the functionality.Note as well I removed from my fiddle the parts that weren't in use, like the
#feedbackstyles).I also gave a
min-widthto several elements, including the#container. This was driven by the desire to maintain layout integrity in the "Input URL" and "Grid dimensions"inputs. If you want it to be truly responsive and maintain layout integrity from wide to narrow, you need to reflow those at certain widths with size-specific properties.
Well, it was still a long answer, but hopefully that helps. Let me know if you have any questions.
Post a Comment for "Positioning Selectors With Correct Dimensions That Scale On Different Screen Sizes"