Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Creating a Portfolio Reply To: Creating a Portfolio

#256903
JeroenR
Participant

First of all, let me say there is no just one way of doing this, but…
The width of the div.info and the aside is larger than the 960px from their parent div#portfolio.
But also, the width of the div.info and the aside isn’t set.
So one think you could do, is set the widths, for example div.info: width: 49%, decrease the right margin (which is now 250px, I’ve set it to 25px like the other sides) and give the aside a width of calc(49% – 50px).
The 50px is then the sum of the margin-left and margin-right. I’d like to take 49% as half of the page because sometimes it just doesn’t fit. Anyway play around with these things will give you the result you want.

I’d also set margin: 0 auto; on the div#portfolio to center it, but that’s just a matter of taste maybe. And to let the thing be responsive, well, that’s another thing.

Another thing, a little out of scope, but I see title, link, and meta tags and probably the script reference to modernizr. They should be in the head instead of the body.
Good luck!

Example: https://codepen.io/jeroenreijs/pen/NgQPoK