473,413 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

CSS bullet image that works???

I have a paragraph and simply want a bullet image to appear at the start
of the paragraph text. I tried the following html:

<p><span class="dot"></span>some text</p>
as seen here: http://solmar.ca/temp8/test1.html

Observed: IE5 and Moz 1.3 works - IE 6.0 and Opera 6.05 does not work

I then assumed that maybe because there is nothing in the span that this
problem appears for IE6 and Opera 6.05, so I tried a kludge as an
expirement:

<p><span class="dot">&nbsp;</span>some text</p>
as seen here: http://solmar.ca/temp8/test2.html

Observed: IE5, Moz 1.3, IE 6.0 works - Opera 6.05 does not work

Any idea what it would take for this to work in Opera 6.05 and if
possible to work without the &nbsp; in IE6?

<img src="img/dot.gif" width="9" height="9" alt="" class="dot">
(i.e. HTML only) works on all browsers but is not a good idea for
multiple reasons.

BTW I also tried lists but found that on some browsers bullet images
where positioned inside the text block and on others they were
positioned outside the text block.

Thanks,

--Nikolaos

P.S. All observations made on Win NT 4 Sp6a

Jul 20 '05 #1
7 7085
In article <PB********************@magma.ca>,
Nikolaos Giannopoulos <ni******@solmar.ca> wrote:
I have a paragraph and simply want a bullet image to appear at the start
of the paragraph text.


p { display: list-item; list-style: bull inside; }

--
Kris
kr*******@xs4all.netherlands (nl)
"We called him Tortoise because he taught us" said the Mock Turtle.
Jul 20 '05 #2
Kris wrote:
In article <PB********************@magma.ca>,
Nikolaos Giannopoulos <ni******@solmar.ca> wrote:

p { display: list-item; list-style: bull inside; }


I tried this and it works fine in Moz 1.3 and Opera 6.05 however it
doesn't work in IE5 at all (I can live with this) all on NT4.

Great - except....

The real problem I found was with IE 6 - even with using unordered lists
I would get something like:

Osome text
and wrapped text like so

but what I want and got from Mozilla and Opera was:

O some text
and wrapped text like so

Do you know how to get IE6 win to behave properly (yes, I know - it
sounds like an oxymoron ;-)?

Thanks again,

--Nikolaos

Jul 20 '05 #3
In article <eK********************@magma.ca>,
Nikolaos Giannopoulos <ni******@solmar.ca> wrote:
p { display: list-item; list-style: bull inside; }


I tried this and it works fine in Moz 1.3 and Opera 6.05 however it
doesn't work in IE5 at all (I can live with this) all on NT4.

Great - except....

The real problem I found was with IE 6 - even with using unordered lists
I would get something like:

Osome text
and wrapped text like so

but what I want and got from Mozilla and Opera was:

O some text
and wrapped text like so

Do you know how to get IE6 win to behave properly (yes, I know - it
sounds like an oxymoron ;-)?


No idea. Play with padding/margin perhaps? Maybe those values are
different by default (pretty often are), whcih would mean no browser is
at fault.

But maybe IE6 is wrong. I had not yet to use this particular CSS, so I
have no exp with how it behaves in IE6. Furthermore, I don't even have
IE.

--
Kris
kr*******@xs4all.netherlands (nl)
"We called him Tortoise because he taught us" said the Mock Turtle.
Jul 20 '05 #4
On Sun, 28 Sep 2003 12:02:18 -0400, in comp.infosystems.www.authoring.stylesheets,
Nikolaos Giannopoulos wrote:
I have a paragraph and simply want a bullet image to appear at the start
of the paragraph text. I tried the following html:
<p><span class="dot"></span>some text</p>
as seen here: http://solmar.ca/temp8/test1.html
Observed: IE5 and Moz 1.3 works - IE 6.0 and Opera 6.05 does not work


What about saying the span but be displayed like a div, so:

span.dot {display: block; float: left; [and all the others things] }

--
++++++++ Zelda, Dragon Ball, Mana and my (art)work at www.salagir.com ++++++++
Jul 20 '05 #5
Salagir wrote:
On Sun, 28 Sep 2003 12:02:18 -0400, in comp.infosystems.www.authoring.stylesheets,
Nikolaos Giannopoulos wrote:

What about saying the span but be displayed like a div, so:

span.dot {display: block; float: left; [and all the others things] }


I tried:

..dot {float: left; padding-right: 10px;
background: url(/img/dot.gif) 0% 50% no-repeat;
width: 9px; height: 9px}

and on IE5 and IE6 it works fine. On Mozilla 1.3 and Opera 6.05 the 50%
has no effect i.e. the bullet is not centered vertically with the first
line of text, rather it is in the upper corner.

I imagine that Mozilla and Opera are doing things right as the
background is being floated and at that point horizontal and vertical
offsets don't make any sense.

I could add some whitespace to the top of the bullet image and eliminate
any CSS vertical positioning except that this won't work well with
different font sizes.

Any other thoughts? Anyone?

Thanks,

--Nikolaos
Jul 20 '05 #6
Kris wrote:
In article <eK********************@magma.ca>,
Nikolaos Giannopoulos <ni******@solmar.ca> wrote:
p { display: list-item; list-style: bull inside; }
Great - except....

The real problem I found was with IE 6 - even with using unordered lists


No idea. Play with padding/margin perhaps? Maybe those values are
different by default (pretty often are), whcih would mean no browser is
at fault.


Doesn't make a difference - looks like IE6 is to blame (so far).

But maybe IE6 is wrong. I had not yet to use this particular CSS, so I
have no exp with how it behaves in IE6. Furthermore, I don't even have
IE.


I do like your suggestion as it means no empty span tags but can't seem
to get IE6 to at the very least align to the left margin and provide
even a pixel between the image and the text.

Does anyone else have any ideas?

Thanks again Kris.

--Nikolaos

Jul 20 '05 #7
Nikolaos Giannopoulos wrote:

[..cut...]

| Does anyone else have any ideas?

Hi Nikolaos,
if only ie supported :before pseudo-class and content property, in my opinion
this would be a good solution because no extra markup would be needed.
A thing as the following would suffice in browsers gecko-based and in Opera7:

p:before{ content: url("dot.gif") }

But it will not work in ie...
So, here's the solution I found. Tested in ie5.5, Opera7 and Mozilla 1.4.

***css***

p span.dot{
padding-left: 9px;
background: url("dot.gif") no-repeat center left
}

p>span.dot{ /*style rule for not-ie browsers*/
height: 0;
padding-bottom: 5px
}

***html***

<p>
<span class="dot">&nbsp;</span>
This is only a test for the emergency broadcast system.
</p>

Hope it helps.
Greetings,
SantaKlauss
Jul 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Gerald S. | last post by:
Hello, I am trying to set the space between the bullet and the first word in a UL, without any luck. My Lists look like: x Item 1 x Item 2 x Item 3
0
by: Nikolaos Giannopoulos | last post by:
I am trying to get bullet images in paragraphs and lists to align properly - so far Moz 1.3 and Opera 6.05 handle both of these cases fine (NOTE: IE5 as expected does not render a bullet in the 1st...
1
by: David Bradbury | last post by:
I may be thinking about this the wrong way, but here goes: In my style sheet I've specified that bullet points should use a specific image rather than just be default bullet points. However, at...
7
by: codeslayer | last post by:
Greetings to everyone in ‘forum-land': I have a problem that has plaguing me to no end. It is a CSS-related question, and I have not seen this question posted anywhere in forums or through...
8
by: Udo Marx | last post by:
Hello to ciwas! Is there a way to change the bullet form, color, etc, of the element <li> under<ul> via css? Any reply will be appreciated. -- Freundliche Gruesse, Netzteil - Udo Marx...
4
by: Gabriella | last post by:
hi, I am writing a simple bulleted list with ul/li, with my image as the list-style-image, and for some reason the image bullet on IE only (FF is fine) is vertically aligned to the top. Meaning,...
3
by: audiogal | last post by:
The bullet lists on my web site (www.hawkinshearing.com) are messed up in IE7 (works fine in IE6, IE5, and Safari). In IE7, the list does not indent and the bullet images do not show up. Any...
2
by: torweb | last post by:
I'm using an image for an unordered list, which works fine. The problem is, the image is also appearing in my numbered "ordered list." Here is my code for the unordered list:...and thanks in...
3
by: vunet | last post by:
When I use image as a bullet within LI element I have different image positioning results in Firefox and IE6. IE6 puts the image on top and far from left LI's border. Firefox puts it nicely in the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.