- This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I’m currently having a problem with a template I am coding. I’m still relatively new to xHTML/CSS so hopefully someone from the community can help. I have navigation on the top of the site, and I want it aligned to the right (similiar to how the text underneath it is aligned to the right). How would I do this?
Here is the code I currently have:
[deleted link to prevent crawling of a directory that’ll be deleted]
Here is how I’d like it to look:
http://i40.tinypic.com/fylnqu.jpg
Here’s a start:
Remove
display: inline; AND margin-left:30px;
Add:
Alright, that fixed up some other issues I was having.
But I’m still stuck with the navigation being aligned to the left, rather than right. The culprit seems to be the float: left; because when removed, the navbar is aligned to the right. But then it looks like a list, rather than each being horizontal with one another.
A workaround would be using float: right;, but this isn’t ideal because then my navigation is somewhat backwards in the HTML file. Although it looks correct visually. Is this my only option? Or is there a solution to my problem? I’d think many people would run into this as I don’t think what I am doing is uncommon. Grateful for the help so far.
Float the list items left, float the unordered list itself right.
Just tried that right before you posted it, lol.
Thanks for the help though, as I might not have thought about that. Glad it works now. :D
Sorry, totally forgot to mention floating the whole list to the right. Glad you sorted it out.