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
Graham Patrick
8,294 PointsOne h tag that requires movement
Hey guys
I have become a little stuck, I have a H1 tag that needs a minus movement by like 50 pixels or so , but for the love of god i cant get it to move
Any ideas
html = <h1 class="title">Submit New Incident</h1>
CSS=
.title {
color:#8f1c85;
font-size: 24px;
margin-left: -60px;
}
Any help would be great
2 Answers
Tim Sweeney
15,101 Pointsthere maybe something blocking it, I'd have a look at the html just to be sure. Also have you applied any additional styling to this element the class (.title) belongs to? it might be overridden by some other styling.
Daniel Jackson
15,099 PointsI agree with Tim. There is probably some other styling that is overriding what you are trying to do. It can also be a number of other things, such as the parent element/s.
Try this!
Using chrome right click on the problem element and select inspect element. This will show the developer console window. The main top window (the one with elements tab selected) shows the HTML and the smaller window to the right (with styles tab selected) shows what CSS styles are being applied. The bottom window is the javascript console but don't worry about that now.
Using the styles window to the right, look at the list of styles and see what is being applied or not being applied that might be causing issues. You can also go in there and turn styles off, change values or add styles on the fly to see what might fix your issue.
The developer console is a great way to debug your site!