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 trialstephanie harrison roberts
1,713 PointsMoving a class element in CSS
Hi all, sorry for this question.....Im clearly being dumb! how would I go about moving some text on my page thats been assigned a class, but sort of goes above the H1 heading on the page. So it has its own class and I can change things like color in the CSS etc...but I cant move its position on the page. I want to make it nearer to the H1 heading, as in close the gap between the two. Ive tried adding margins and padding to the class in CSS but nothing changes its position?
thanks in advance
Stephanie
1 Answer
Steven Parker
231,261 PointsAs a generic suggestion, you might need to reduce or remove the existing margins on both your added element and on the h1 you want to move it nearer to.
If that doesn't resolve it, post your actual code as Adam suggested to allow a more specific answer.
Adam Beer
11,314 PointsAdam Beer
11,314 PointsPlease show we your code. I'm not sure what you want exactly.