Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / April 2008

Tip: Looking for answers? Try searching our database.

UL list-style-image not working

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Angelo - 23 Apr 2008 20:08 GMT
Hi all,

I am having a very annoying problem when using an unordered list in my
aspx page. I set a UL style to use a custom image as the list style
image but it does not show in the screen. I have tried it in a couple
different ways but still no go. I have tried inline styles as well as
using a style sheet class but it just doesn't show the image on the
<li> element. The odd thing is that it will take the rest of the UL
style but just not the image.

SPECS:
Windows XP Pro SP2
IE 7
Firefox 2.x
ASP.NET 2.0

Here's the code I am using:

<asp:Content ...>
<!-- I do some binding to a dataset here that is unrelated to the
UL ... -->
<ul style="list-style-image:url('images/arrow.gif');list-style-
type:square;">
<li> test entry</li>
</ul>
</asp:Content>

This does not show my custom image but only shows the built-in square
list type. I know the image path is correct because I can do an <img>
tag with the same path and it displays correctly on the page.

Also, I get the same behavior on IE as FF.

Anyone seen behavior like this before?

Angelo
Hans Kesting - 24 Apr 2008 13:31 GMT
After serious thinking Angelo wrote :
> Hi all,
>
[quoted text clipped - 32 lines]
>
> Angelo

A guess: is the "list-style-type:square;" overriding the
""list-style-image:url()" setting? Try it without the "square".

Hans Kesting
Angelo - 25 Apr 2008 16:22 GMT
Thanks for the reply, Hans. but I had already tried that. I have tried
it in the following ways with the same results: image just doesn't
show.

METHOD 1
---------------------
list-style-type:none;
list-style-image:url('images/arrow.gif');
list-style-position: outside;

METHOD 2
---------------------
list-style-type:square;
list-style-image:url('images/arrow.gif');
list-style-position: outside;

METHOD 3
---------------------
list-style: none url('images/arrow.gif') outside;

METHOD 4
---------------------
list-style: square url('images/arrow.gif') outside;

I was wondering if the asp.net order of rendering had anything to do
with it. But not sure if that would matter.

Angelo

On Apr 24, 7:31 am, Hans Kesting <invalid.han...@spamgourmet.com>
wrote:
> After serious thinking Angelo wrote :
>
[quoted text clipped - 40 lines]
>
> - Show quoted text -

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.