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
Nathan Begnaud
8,221 PointsHow To Position Text In The Correct Places?
I've been having trouble with this for a while now. Basically what I do to get h1 and p tags to go where I want is, I use margins and padding to push it where I want it to go. Sometimes I will use floats but even then I still have trouble. It seems so easy to just get text over to the correct place but then when I do it starts creating more problems. Such as the text moving when resizing the window. I don't understand what I'm doing wrong? Is it that hard to get text to be positioned correctly without moving? How do you guys position your text?
1 Answer
Aurelian Spodarec
7,369 PointsHi, what do you mean by moving text ? If i want to move text for example nav bar , i do it with float in a list and then i ad padding so the words have space . You can aslo , if your writing a blog or something , ad a padding on the outerDiv so the text dont get on the padding and it pushes it more in center if you know what i mean . You can also move text usin jQuery i think dont remember exactly but it should make your text moving responsive to the window layout . If you use in padding % it will make your text allways fit the screen.
And the last think is to make align it to left or right. See this course http://teamtreehouse.com/library/how-to-make-a-website/styling-web-pages-and-navigation/build-navigation-with-unordered-lists .
Hope it helps