Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Putting a UL link inline with other text
Old 11-21-2006, 09:26 AM Putting a UL link inline with other text
Skilled Talker

Posts: 81
Trades: 0
Hi folks

Can you see any way to force this UL to go inline. Any time I succeed, the whole thing goes invisible.


Code:
<style>
ul#bmarkicon { display:block;  }
#bmarkicon { padding:0; margin:0; }
#bmarkicon li { display:block;list-style-type:none; background: url(http://ied.gospelcom.net/images/bookmarkicon.gif) no-repeat left transparent; }
#bmarkicon a, #bmarkicon a:visited {
  color:red;
  width:16px;height:16px;
  border:none;
  font-size:1px; letter-spacing:-5px;
  text-decoration:none; display:block;
  }
</style>


</head>

<body>

Some text all on oneline <span style="display:inline;">
<ul id="bmarkicon">
<li><a href="index.php">linkname</a></li>
</ul>
Some more text on the same line
</span>
The small font size for the link is there for a reason - to make it virtually invisible, likewise the letterspacing.

I can something similar with a span and samecolor background as text. However, an li link has some advantages, if it will work.

The purpose is, to create what looks like a graphic, which can be right-clicked on, to bookmark the site rather than the page, or can be drag/dropped to a start button to make a start menu shortcut

It seems to need display:block within the ul code,otherwise it displays but ceases to be a link.

I have managed to make it go inline with the text in IE but not FF, but then it ceases to be a link.

Code works if ul#bmarkicon { nothing here } but if it is changed to
ul#bmarkicon { display:inline; }
the link ceases to work.

Maybe it is intrinsically impossible?

Best wishes and thanks


Tony
soon is offline
Reply With Quote
View Public Profile Visit soon's homepage!
 
 
Register now for full access!
Old 11-21-2006, 11:19 AM Re: Putting a UL link inline with other text
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
If you want a list to be horizontal, you're going to have to specify display: inline for the list element <li>.
http://css.maxdesign.com.au/listutor...troduction.htm

You've got it set to display:block, which is unnecessary because a UL IS a block-level element.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 11-21-2006, 12:42 PM Re: Putting a UL link inline with other text
Skilled Talker

Posts: 81
Trades: 0
Thanks, I have managed to get it inline, but with the very small font, connot make the li width stay at 16px height 16px for some reason:
Code:
<style>
#bmarkicon { display:inline;padding:0;margin:0;width:16px;height:16px; }
#bmarkicon li { display:inline;width:16px;height:16px;margin:0px;list-style-type:none; background: url(http://ied.gospelcom.net/images/bookmarkicon.gif) no-repeat left red; }
#bmarkicon a, #bmarkicon a:visited {
  color:white;
   font-size:1px; 
  text-decoration:none;letter-spacing:-1px;
border:none;
  }
</style>
Any ideas on that?

Many thanks


Tony
soon is offline
Reply With Quote
View Public Profile Visit soon's homepage!
 
Old 11-21-2006, 01:22 PM Re: Putting a UL link inline with other text
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
try adding a line-height rule.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Putting a UL link inline with other text
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13552 seconds with 12 queries