You are here: Re: CSS - horizontal suckerfish problem « HTML « IT news, forums, messages
Re: CSS - horizontal suckerfish problem

Posted by Ben C on 11/06/06 18:38

On 2006-11-06, z <news01.web@mailnull.com> wrote:
> Ben C wrote:
>
>> On 2006-11-06, z <news01.web@mailnull.com> wrote:
[snip]
>>> One more question... is there a way to put a green line below the top
>>> part of the menu, and have the lower dropdowns appear below the green
>>> line?
>>
>> Of course, there are many ways.
>>
>> I've lost track of your original example, but couldn't you just put
>> something like border-bottom: 2px solid green on the top part?
>
>
> I was trying something like this but it isn't working. The border appears
> to the right of everything.
> ul#nav {
> border-bottom: 3px solid green;
> }

It's because the <li>s inside the <ul> are floats, so they don't
contribute to the <ul>'s height, which is auto and computes as zero. The
border sticks out a bit at the right, for the rest of its length it's
obscured by the "Menu Option" boxes.

If you make ul#nav also float: left, it becomes the "block formatting
context root" for the <li>s and so grows in height to fit them, resulting
in the border being in the right place.

This may not be the best solution in your case though. You'll need to
post a link to your current version.

> My version has all the borders removed, with grey on white text for
> everything.
>
> Complicated... I'm also trying to put a list-style-image next to only the
> top-level items. Haven't been successful with that either.

It should work, but it's up to browser exactly where the list item image
goes. Usually a few pixels off to the left.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация