- This topic is empty.
-
AuthorPosts
-
November 19, 2014 at 8:13 am #188739NikeAirforce1sParticipant
Hey guys, please just a few things wrong and I’ve been battling these and reached a dead end.
A big problem is I’ve got 3 divs all floated left with a 33% width to fit in my 1170px container, this fits fine but when I apply a padding to the right they break…I tried to add “box-sizing:border-box” but this didn’t help. so the following section class also creeps up while one of the “col-one-third” is on another line, I added a clear fix to the parent but this didn’t resolve my issue.
Here it is on codepen.
http://codepen.io/waggawagga/pen/OPPWzE
Also the jumbo area, how can I get the “sign up for free” to be aligned to the center just like “porfolio bear and it’s free and awesome”.
Lastly, can someone explain why I needed to float my logo to the left? I’ve seen tutorials where they don’t float their logo but just float the the nav to the right and it stays, I had to add float left for my layout to header to appear like I wanted.
Thanks for your time.
November 19, 2014 at 8:18 am #188740Paulie_DMemberOK, one thing at time.
A big problem is I’ve got 3 divs all floated left with a 33% width to fit in my 1170px container,
Which three divs? The ‘features’ section?
That would be the margin you’ve added.
November 19, 2014 at 8:29 am #188742Paulie_DMemberAlso the jumbo area, how can I get the “sign up for free” to be aligned to the center just like “porfolio bear and it’s free and awesome”.
Just add
text-align:center
the parent.I threw in some
margin-bottom
on theh2
for soem separation tooNovember 19, 2014 at 8:45 am #188745NikeAirforce1sParticipantPaulie thanks…I don’t now why I didn’t think of adding
text-align:center
to the parent but appreciate your help.Yes those “feature divs”, I realised it’s the margin 10px that I added but I thought if I then use the box-sizing:border box it’ll fit, I’d like to have a bit of margins between the divs as with no margins they’re bunched up together,
Thanks
November 19, 2014 at 8:50 am #188746Paulie_DMemberMargin are extra to the width even with
border-box
.If you want some apparent vertical separation to those divs add some internal left/right padding
November 19, 2014 at 9:12 am #188749NikeAirforce1sParticipantThank you so so much for your time…I was really stuck on it from yesterday and just put it the side.
Best regards.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.