HTML & CSS
hi all..my website looks fine with screen resolution 1366..: http://bluecrushdesign.co.za/imagin82/ But my client has a screen resolution of 1024 x 768and when i change my resolution down to this, my nav links and left & right arrows move all the way to the right.This code for nav links and left & right arrows are not available to edit in the HTML, the js spits it out..Anyhing i can do in the css for div #coda-nav-1 so that it looks good on both resolutions?appreciate the help!
Firstly, fixing a main menu 1080px to the right is not a good idea. As you've seen, it makes the site harder to use for anyone with a narrower viewport. The most usable position for a vertical menu is left.
coda-nav-1 is set to position:absolute; which means that it is taken out of the flow of the document and positioned in relation to either a parent that has position:relative; or, if no such element exists as is the case here, the body element.
If you want the menu to hang with the rest of the content of #wrapper, which is centred within body with a fixed width of 1010px, you could give its immediate parent - .coda-slider-wrapper - position:relative; and remove the left properties (there are two currently set) from #coda-nav-1. The menu will then, due to the 10px left/right margins on .coda-slider, sit 10px to the left of the left edge of the slides. If you want the left edges to align, give #coda-nav-1 margin-left:10px;
Having done the above, you'll notice that the left and right controls have vanished. This is due to their now being positioned in relation to.coda-slider-wrapper and further right than that elements fixed width. You'll need to decide whether it is best for usability for the left and right controls to be on the right or left. Again, I would go for left, as it puts them in sight for far more users. For this, remove left: 1080px; on both .coda-nav-left and .coda-nav-right. As for the menu, give them margin-left:10px if you want them to align with the slide.
Here's the result (at 50% size).
thanks ill have a read through!the client actually wants the menu and arrows on the right side though ps how did you put line breaks in your post?
So the client is happy as long as the navigation fits on their browser. :rolleyes:
I see you've followed the positioning suggestion but used left:900px; For aligning right edges right:0; is arguably more apt. You've still two declarations for left in #coda-nav-1. ie. left:100px; can go.
Line breaks? Just hitting enter, as usual. Do you mean in the CSS? I write and format posts in a text editor then paste them in, using the Syntax highlighter with the appropriate type for the code.
This topic is now closed. New replies are no longer allowed.