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

CSS

CSS problems | Fluid boxes | Margins |

Hello, As we see here http://scr.hu/2icp/bvgvz my problem is to have the margin on the user feed and the text to gentily float on the image right . It should be in the user feed and the car should move inside the user feed and not move all user feed , it works fine but when i set margin on top , it moves all the feed.

""" <div id="news_feed">

            <div class="user_post">

                    <div class="picture_post">
                        <img width="350px" height="250px" src="images/ferrari.png" >
                    </div>

                    <div class="wrapper_writing">

                        <div class="user_header">
                            <h1>Transport $15 - max 200km</h1>
                        </div><!-- user_header -->

                        <div class="user_writing">
                            <p>Lorem the mar the qando che. Io se no fa ale jando barcelona che io le to hke ale nie moge bo i ta nie che ma i dicco che non. Ite ne posso dare perche i cani dovevano runere and this is sparta che io non.I ci ne vedo ilso cane che aow bow bow </p>
                        </div><!-- user_writing -->

                    </div><!-- wrapper_writing -->

            </div><!-- userPost -->

"""

css=

"""

news_feed{

background: green;
height: auto;
width: 900px;
float:left;

} /USER POST/

news_feed{

background:red;

} .user_post{ height:300px; width:50%; }

.wrapper_writing{ display: block; position: relative; float:left; left width:50%;

}

"""

3 Answers

Hi Aurelian,

Just so I get this correct, you want your H1 and the text to appear in the box to the right of the image?

NOTE: at the end of your .wrapper_writing you have left width:50% remove the LEFT.

Hi Wayne, I managed somehow to get it right , thought im suprized and not comletely sure how i did it but it worked . yes i did remove left or something and it did worked . But now im facing another problem to make it clear i mean the code .

The problem is that if you look http://scr.hu/2icp/esyzw

oh wow , i managed to do it : p i think it works fine , i put the user post on auto width and its like i wated : p not sure it that wont get any later probems

Hi Aurelian,

Glad the first problem is now sorted out.

As for the new problem, its a bit confusing for me looking at your link, could you explain it for me in a comment and post a little of the new code you have wrote please :)

i managed to solve it out not completely sure how it all works as i did get in the code and paly with it quite a lot but i hope with time it get better , i just need to make a website , so i have a project to work on it when i go throw the courses of JS and PHP i can apply it there . But thank you ery muh for your help , the eliminating left helped because it went how it should go ^^ and the code is clean now :)

but i have another problem here https://teamtreehouse.com/forum/getting-the-box-go-all-the-way-down , i know a lot of problems , probabiy should watch the css courses , well i can make , code any website i want from look but then sometiems i have little problems so i decided to mowe out from it and then upgrade my skills for it later one , as i did fexy layout , i sort of understand it and ill use it later one a bit .

Glad its sorted, and don't worry about posting too many questions, thats what everyone is here for.

Your doing the right thing by building a website to practice on, its the only way to improve.

Good Luck.

Thank you :) I did a website that i pretty liked it but the code was catastrphcis thats why i need to make this code clean and learn how everything works together then i will dive on PHP and JS projects .

Well , have nice surfing on the forum and have nice learning too :)