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 trialDharmesh Sheth
2,547 PointsCSS problem
Hello all, I have design this website for my client and I am having problem with the CSS. Can someone advice on how I should fix this problem
Please see link: http://www.londondacianservices.com
7 Answers
Adam Moore
21,956 PointsI think you might be wanting to have the blue and red divs on either side of the middle hard hat div. If this is what is happening, it seems that maybe the total size of the three divs don't fit together on the line. It seems to me that with all of the different width components that are set (i.e., padding, border, etc.) that your first two floated items are pushing the third downward. Also, when I look really closely, the yellow border of the middle div slightly overlaps the red on the div underneath. Not sure if this is what the problem is, but that's my attempt :)
Adam Moore
21,956 PointsOn my laptop, if I change your "#content-2-1" div from "width: 56.2%" to "width: 56.1%", then it puts the red div on the same line as the blue and yellow ones.
Adam Moore
21,956 PointsAs I look at it further, when I try to shrink my browser to a smaller width, it drops the red div down again. So, you may have to use some media queries to set the left and right divs to drop below. Or set the middle yellow div to retain its size in order to keep the slideshow visible, while shrinking the sides until it gets too small and the side divs have to drop down, keeping the color scheme of blue-yellow-red on the same line as long as possible. I'm not even close to being a pro, but I couldn't figure out if there was a way for me to size the slideshow animation with a percentage to cause the entire line to shrink with a decreased browser width, but that would seem to me to be the best bet (along with some sleek media queries).
Sean T. Unwin
28,690 Points#main
and everything in it does not have any grid classes attached.
This may be personal preference, but I would probably use em
or rem
for the padding-left
in the nav
so the spacing is not so reliant on the screen width. I say this because you have many items in the nav.
Actually, the more I think about it, layout alternatives could be to have the nav beneath the logo so you are able to utilize the full width or have it vertical. Then if you are concerned about white-space to the right of the logo you could move the language icons beside the logo and align them to the right of the page.
Dharmesh Sheth
2,547 PointsProblem which I am facing is laptop and PC with smaller screen is that me the red part of the flag is below the rest
Dharmesh Sheth
2,547 PointsProblem which I am facing is laptop and PC with smaller screen is that me the red part of the flag is below the rest
Dharmesh Sheth
2,547 PointsProblem which I am facing is laptop and PC with smaller screen is that me the red part of the flag is below the rest
Tom Bedford
15,645 PointsTom Bedford
15,645 PointsHi Dharmesh, could you elaborate on what the problem is?