Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Marcus Tisäter
4,886 PointsOptimizing Website, CSS
Hello everyone,
I've been working a lot with css and html but the only thing I don't seem to figure out is to optimize and positioning my webpage with %,px,realtive,absolute, wrapper_divs etc..
Here is my code; What am I doing wrong? Can somone walk me through?
http://codepen.io/anon/pen/wdEnx
This is not the offical website, just a prototype so you guys could help me out here! Obviously I can't be creating a wrapper with a min and max width,height.... I don't get it. I'm stuck!
Feedback of css coding please, what should I focus on and what's the biggest issue of the code?
Where can I learn more about positioning and optimizing here on treehouse?
2 Answers
Kevin Korte
28,149 PointsHave you been through all of the CSS lessons? I'm not understanding what you are trying to accomplish, so I'm not sure how to respond.
nik
8,925 Pointsif your gonna use fixed widths and heights in px then I don't think you need min/max. Your code looks fine for a template don't see nothing wrong. Start adding your content and you'll see where you need to adjust your code.
Marcus Tisäter
4,886 PointsMy main point is if it's the correct way of doing it? Is there any other way? Does this work?
nik
8,925 Points-
The correct way of doing it?
Yes it is, you have all the proper syntax and format. It comes up correctly on the preview and really that's all that matters.
-
Is there any other way?
Yes there are a lot of ways, but we all want to follow best practice and clean code. Yours looks fine.
-
Does this work?
For this example yes and you will know when it doesn't work.
Don't over think it if you're still doubting yourself go over the deep dives for HTML and CSS foundations. I'd also recommend taking that responsive website course to answer your questions about using percentages and positioning. You can also use tools such as W3C's validator to see if there's anything wrong with your code when you launch it.
Marcus Tisäter
4,886 PointsThanks mate, cheers!