Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Css Ordered List problem FF and IE

Reply
Thread Tools

Css Ordered List problem FF and IE

 
 
Gan Forr
Guest
Posts: n/a
 
      01-28-2008
Hi...I've got this problem...I hope somebody will help me....

I have this ordered list and I want every element of the list aligned
to the left border of the containing div, just like the text above and
below.
In firefox works perfectly, but in IE every element of the list is
slightly on the left of where I want it to be.

Thank You
Here's the code:
---------------------------------------------
<html>
<head>
<style>
div.normal
{
position:absolute; left:10px;
border:1px solid #404040;
font-family:Verdana;
font-weight:bold;
font-size:10px;
padding: 4px;
text-align:left;
}

ol {
list-style-type:lower-alpha;
list-style-type:lower-alpha;
margin:0 0 0 1em;
padding:0 0 0 1em;
}
</style>
</head>
<body>
<div class='normal'>
<br />Allora, prima di tutto, vediamo cosa ci serve.
<ol><br />
<li>Un certo numero di quotidiani (la carta di quotidiano la
migliore per la cartapesta - se non li leggete, iniziate a farlo)</li>
<li>Una bacinella</li>
<li>Un paio di tonnellate di colla vinilica ()</li>
<li>Filo di ferro (o qualcos'altro se vi vengono altre idee); quello
che ho usato io spesso circa 1,5mm</li>
<li>Nastro adesivo di carta</li>
</ol><br />Adesso vediamo i passi principali:</div>
</body>
</html>
 
Reply With Quote
 
 
 
 
SigelsTankMage@gmail.com
Guest
Posts: n/a
 
      01-29-2008
ok first of all stop using internal style sheets. cut and paste your
css into a separate text document and save it as style.css

now put this code inbetween the <head></head> tags like this:

<html>
<head>
<link rel="stylesheet" type="text/css"
href="style.css" />
</head>
</html>

now make a new text document called "ie6.css" or "ie7.css" and
copypasta all your css from your style.css document and make changes
accordingly for ie6 or 7 so that your page displays proper.

now put this in your header:

<html>
<head>
<link rel="stylesheet" type="text/css"
href="style.css" />
<!--[if IE 6]>
<link rel="stylesheet" type="text/css"
href="iespecific.css" />
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css"
href="iespecific.css" />
<![endif]-->
</head>
</html>



On Jan 28, 5:50*pm, Gan Forr <(E-Mail Removed)> wrote:
> Hi...I've got this problem...I hope somebody will help me....
>
> I have this ordered list and I want every element of the list aligned
> to the left border of the containing div, just like the text above and
> below.
> In firefox works perfectly, but in IE every element of the list is
> slightly on the left of where I want it to be.
>
> Thank You
> Here's the code:
> ---------------------------------------------
> <html>
> <head>
> <style>
> div.normal
> {
> * * position:absolute; left:10px;
> * * border:1px solid #404040;
> * * font-family:Verdana;
> * * font-weight:bold;
> * * font-size:10px;
> * * padding: 4px;
> * * text-align:left;
>
> }
>
> ol {
> * list-style-type:lower-alpha;
> * list-style-type:lower-alpha;
> * margin:0 0 0 1em;
> * padding:0 0 0 1em;}
>
> </style>
> </head>
> <body>
> <div class='normal'>
> <br />Allora, prima di tutto, vediamo cosa ci serve.
> <ol><br />
> <li>Un certo numero di quotidiani (la carta di quotidiano la
> migliore per la cartapesta - se non li leggete, iniziate a farlo)</li>
> <li>Una bacinella</li>
> <li>Un paio di tonnellate di colla vinilica ()</li>
> <li>Filo di ferro (o qualcos'altro se vi vengono altre idee); quello
> che ho usato io spesso circa 1,5mm</li>
> <li>Nastro adesivo di carta</li>
> </ol><br />Adesso vediamo i passi principali:</div>
> </body>
> </html>


 
Reply With Quote
 
 
 
 
Gan Forr
Guest
Posts: n/a
 
      01-29-2008
SigelsTankM, first of all, thanks for your reply.

I do have a separate style sheet actually, but this is not my real
page, it's just a portion of the text I have to display with the
relative style. I put everything together to make the code easier to
read.

Do I have exactly put something like <!--[if IE 6]> in the header to
decide which css to use?

By the way, what I needed to know is what to put in IE css to get the
same result of Firefox, that is, to get the list aligned to left.

This is what I mean:
Firefox:
http://img201.imageshack.us/my.php?image=ffht3.jpg

Internet Explorer:
http://img180.imageshack.us/my.php?image=ieza0.jpg

I just want the list aligned as in Firefox, but I can't get the same
result in IE, no matter what I try (at least what I tried)

Thank you again
Federico
 
Reply With Quote
 
Bergamot
Guest
Posts: n/a
 
      01-29-2008
Gan Forr wrote:
>
> I have this ordered list and I want every element of the list aligned
> to the left border of the containing div, just like the text above and
> below.
> In firefox works perfectly, but in IE every element of the list is
> slightly on the left of where I want it to be.


The subject of list marker alignment came up in the ciwa.stylesheets
newsgroup just a couple weeks ago.
http://groups.google.com/group/comp....568bb00410310e

--
Berg
 
Reply With Quote
 
Gan Forr
Guest
Posts: n/a
 
      01-31-2008
Sorry SigelsTank, I was so stupid....your answer was satisfing
enough....I was so distracted that I had'nt realized that I already
had the solution....Actually, with conditional comments I can easily
use a customized css for IE; so I just need to adjust the margin and
padding as I need.

thank you
F
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ordered list inside ordered list DL Javascript 6 11-21-2009 11:43 PM
Ordered list not working in any browser andynagai@verizon.net HTML 3 04-05-2006 08:14 PM
Setting the distance between numbers and text in an ordered list. richard_quick_uk@hotmail.com HTML 3 07-30-2005 02:53 AM
Help Please : - Retrieve object key held in an ordered linked list node Newbie Java 1 04-06-2004 11:12 PM
ordered list (OL) tag with tables Arvind Ganesan HTML 10 09-06-2003 09:47 PM



Advertisments