Jump to content


Problem with Navigation & CSS (first-letter)


2 replies to this topic

#1 bunghole

    Young Padawan

  • Members
  • Pip
  • 1 posts

Posted 31 March 2007 - 05:04 AM

Hi,
im trying to build a navigation menu with css, where the first letter of each link has a different color
ive tried tables & <ul>/<li>, both dont work

it shoul look like:
Link1 Link2

but it looks like:

Link1 Link2

has anybody a solution for this problem?

Edited by bunghole, 31 March 2007 - 05:05 AM.


#2 Brandonador

    Young Padawan

  • Members
  • Pip
  • 238 posts
  • Gender:Male
  • Location:Michigan
  • Interests:I really love computers. Especially the internet, and discovering new people's ideas, and designs. Love to look at different layouts and coded designs that people come up with. And Flickr, one of my favorite sites...

Posted 31 March 2007 - 08:07 AM

I think what may be an alternative to CSS, which may also be easier than CSS. The reason being is because you have to have different styles for simply one letter for each link. So I suggest you simply use:

<font color="colorhere">L</font>ink <font color="anothercolorhere">L</font>ink2

Hope this helps you in some way. :google:

Brandon

#3 xis

    Young Padawan

  • Members
  • Pip
  • 191 posts
  • Gender:Male
  • Location:Los Angeles, Ca.

Posted 02 April 2007 - 07:02 PM

You can use spans to get the results you want

here's an example for the html
<li><span>L</span>ink</li>

And the CSS would look like this
li span
{
background: inherit;
color: red;
}

This should work for you. Maybe someone more versed in css can correct any issues with the above.

Good luck





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users