February 20, 201313 yr Ok, I'm sure that I am missing something obvious here, but I cannot seem to get my Nav bar to align right. Its really frustrating me, tried the float:right and also margin:auto, but not getting anywhere. Do you have any ideas? This website is responsive/elastic, so I am reluctant to resort to fixed pixel widths or even percentages if I can avoid them (although will try this if I have to) There must be a simple way of just telling a div to align to the right? http://www.mason-uk.co.uk/responsive/html5boilerplate5-newnav.html Edited February 20, 201313 yr by AblazeRich
February 20, 201313 yr You could add a float:right; style to the .nav class. .nav { list-style: none; background: #4a5f6d; font-size: 12px; font-weight: bold; float: right; }
February 20, 201313 yr Just add position: relative; left: 255px; or float: right; to your .nav EDIT: Lyndsey ninja'd in before me Edited February 20, 201313 yr by Alluziion
February 20, 201313 yr Just add position: relative; left: 255px; or float: right; to your .nav EDIT: Lyndsey ninja'd in before me
February 20, 201313 yr Author Thanks but I already tried float right and it doesn't seem to work in this case, dunno why, v.annoying Also this is a responsive/elastic design, so I can't really used fixed pixels... Edited February 20, 201313 yr by AblazeRich
February 20, 201313 yr Thanks but I already tried float right and it doesn't seem to work in this case, dunno why, v.annoying Also this is a responsive/elastic design, so I can't really used fixed pixels... Worked for me using Web Developer plugin. Maybe it's conflicting with something... try adding !important and see if it works and if it does, try and find out what's overwriting the style.
February 20, 201313 yr Are you sure? I can see you've updated it as it's now floating right on my screen (I'm using Chrome V 24.01). What browser are you using? Edit: This is what I see: http://i48.tinypic.com/umyba.png Edited February 20, 201313 yr by Lyndsey
February 20, 201313 yr Author Thanks guys it just started working for some reason.... dunno why it wasn't before? Perhaps there was a glitch with my FTP upload, it did it to me the other day too... Thanks
Create an account or sign in to comment