Re: How to overcome IE negative margin bug?




"Stevie D" <stevie@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:b95oc1hishbjcm2mf63bnrmv2udjoegv9m@xxxxxxxxxx
>> Now I want to do is make the last of the these align to the right, rather
>> than be just the next option along the bar. Once I would have used a
>> table
>> and placed the last item in a second cell and aligned that. However, I
>> understand that I should be able to use CSS to achieve the same end. If
>> that is the case... How?
>
> A first suggestion would be
>
> ul#menu {display: block; background: blue; position: absolute; top: 0;
> left: 0; width: 100%; margin:0;}
> ul#menu li {float: left; padding: 5px; border: white 1px solid;}
> ul#menu li a {color: yellow;}
> ul#menu li#right {float: right;}
>
> <ul id="menu">
> <li><a href=...>First</a>
> <li><a href=...>Second</a>
> <li id="right"><a href=...>Third</a>
> <li><a href=...>Fourth</a>
> </ul>
>
> By doing it this way, you can have any one of the list items
> right-aligned, without changing the order of the list.

Ah! Silly me! For some reason I have a blind spot on "float" and never
think of it when I need it! This, indeed, should give me the tool I need!

I wouldn't have thought of a list either! Though I see I'll have to do
something to stop Mozilla placing unwanted bullets all over the place! :-)

Although, initially, I called it a "menu bar", it would be more accurate to
call it a "navigation bar" as it is repeated at intervals down fairly long
pages and provides a "Top" link to return users to the menu at the top of
the page. So in my case I guess I'll have to remove position absolute code?

Only in a handful of special cases will this repeated bar have options other
than or in addition to "Top". In my update of the site I plan to add an
additional fixed option to this bar, and this is the one I plan to be right
aligned.

> This declaration will affect all list items in <ul id="menu">,
> but not in other <ul>s. That way you don't need to define
> li.menu {...} and then specify <li class="menu"> for every list
> item in the menu. It is much less typing, much less to go wrong,
> and much easier to fix and to change.

Although I take your point about use of #id rather than class, in my case I
guess it is class that I will need because of the repetition of the bar.

The site, in its soon to be reconstructed state, is at:
http://www.waterwaysguides.co.uk
Any of the pages in the "Updates" section show examples of the bar, and the
option to be added is "Submit Update" as the route to that page on the site
is currently fairly well hidden, in the "More!" section :-) (The site's
last major rebuild was about three years ago and has been completely
neglected this year. I've masses of updates to be added that have been
received by e-mail as well as the few submitted via the Virgin "guestbook" -
that's another thing to be rebuild with the cgi space that I now have
available!)
--
Greg Chapman
http://www.waterwaysguides.co.uk
for updates to Nicholson, Imray and Pearsons Guides - and lots more!





.



Relevant Pages

  • Re: SP2 makes XP-Home/SP1 CD useless - other PC problems.
    ... connect to the internet and download updates.. ... Re. security settings, they should be set to medium.. ... >> You click on the bar and wait a few seconds is what you do.. ... > # No window appears 98% of the time. ...
    (microsoft.public.windowsxp.configuration_manage)
  • RE: status bar doesnt move!!
    ... No progress bar at Windows Update ... If no green progress bar scrolls when attempting to check for updates at ... Please read the page and Scroll down about 2/3 of the way to Download ...
    (microsoft.public.windowsupdate)
  • Re: Windows XP Freezing & Locking Totally
    ... >I have re-installed Nortons AV from scratch. ... Bell & got all the latest updates. ... I also have the Task Bar at the bottom, ... >>specific name of the virus, ...
    (microsoft.public.windowsxp.perform_maintain)
  • GNOME menu bar moved suddenly
    ... I'm running Dapper on this system, with all the current updates. ... I was inspecting some pdf files and ... while I was scrolling in evince I noticed the desktop changed -- it ... A few weeks ago I had all the menus disappear from the menu bar so I ...
    (Ubuntu)
  • Re: British Trident programme dead?
    ... Have a plan. ... And how does this apply to a bar brawl in Arizona, ... But at least one gun in hip pocket probably good idea. ...
    (sci.military.naval)