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

Trying to position a fixed element

I made a top nav with an image and 2 images for face book and twitter in the top right corner there all fixed. I created a separate class #links, currently there fixed i moved them just below the image at the top. I would like to align them horizontally. I think i may have set my html wrong, i am not completely sure..http://codepen.io/zema/pen/iaqgc

10 Answers

I don't understand exactly what you are tyring to achieve. A quick look at your code and still unsure? Also some of your content is outside the <body> tag. This tag needs to be moved to directly after the </head> tag.

If you can elaborate a little more on your goals i will try to assist you.

Is this kinda your aim tweated your code and made it more semantic. http://cdpn.io/ImLBE

Actually yes, this is what i was going for, thanks very much. Sorry for the late reply, i had to work a night/day shift. I was wondering though, could you explain why i could not accomplish this with a div id? I watched all the videos i am trying to understand why commands work the way they do.

No problem if solved click the best answer and up vote. The reason it wasn't working is firstly some of your content was outside the body tags, then for the nav its advised to use an unordered list(ul) with list items(li). Then you can edit them alot more. I would re watch the videos again until it sticks i watched them several times also take notes. Other good thinks to do are find sites you like if using chrome right click choose inspect element and you can look what is done to make different elements on pages you like. Then try to recreate it yourself. But honestly just practise until it becomes easier.

Also if you click edit on my codepen like you can view the changes and compare to yours

Yes, i was looking at your code then mine trying to figure out why.

Does it make sense to you? Happy to answer any questions you may have!

I really did not wanna make another thread so soon, so i figured i would post my issue here, my pc is no longer taking any style changes to my website, when i post the code in codepen it's fine. Say i were to change the code of <h1> to tomato, in my browser the style changes don't change. However if i post it in codepen, it will show up like it supposed to. A friend was telling me windows is bad to script with, does anyone know of a fix for this?

Is this a live site ie. hosted with a www. or is it a site on your computer?

Hosted locally on my pc. Changes wont show in firefox, ie, or chrome.

Could you take a screen shot of the html and css files or send them to me at Sacki2013@gmail.com and i will see if i know what is wrong. It won't be anything to do with Windows.

but the changes show in codepen. it's weird.. http://cdpn.io/iaqgc i ended up deleting some of the css stuff you put in before cause i thought something got mixed up so i started changing things around..

I can't see exactly whats going on in codepen as it handles the stylesheet different. On your local machine how are you adding styles ie inline, external?

sorry sent you the flies plus the images, was trying to see if i can set it up on codepen, too many issues

Cool. Got them. 1 Question the files you sent me, are they named the same on your system?

should be, Duvant_Logo.png twitter.jpg, and Facebook.png

Was referring to the blah.css and blah.html. As i think i found your problem. In the html file look at the link tags at the top and the name for the stylesheet its linking to is called styles.css but your file is called blah.css so either change the file name to styles or change the link to blah.css. This should sort it out. Also ensure the normailize.css is above the other one as they cascade (from top to bottom) and since normalize is making it look consistent across all broswers this should be first then the custom styles.

<link rel="normalize" href="normalize.css">
<link rel="stylesheet" href="blah.css">

Above is how it should look

IGNORE THIS POST IT HAS AN ERROR. SEE THE NEXT ONE.

Was referring to the blah.css and blah.html. As i think i found your problem. In the html file look at the link tags at the top and the name for the stylesheet its linking to is called styles.css but your file is called blah.css so either change the file name to styles or change the link to blah.css. This should sort it out. Also ensure the normailize.css is above the other one as they cascade (from top to bottom) and since normalize is making it look consistent across all broswers this should be first then the custom styles.

<link rel="stylesheet" href="normalize.css">
<link rel="stylesheet" href="blah.css">

Also rel="" should always be stylesheet as this defines the relashionship of the file to the browser

ugggggggg...that's right when you sent me the adjustments last night i made a copy~ i am sorry for something, quite, stupid..

Not a problem happy to help mate :)