Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / April 2007



Tip: Looking for answers? Try searching our database.

<OL type="1"> and IE

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill - 26 Apr 2007 19:11 GMT
Hi

In a css page I have the following:

[CSS]
.OLC{float:left; width:150px;text-align:center; }
OL{ list-style-position:inside;}
LI{ height:160px;}

[/CSS]

and in the site page:

[HTML]

...
<div class="OLC">
<OL type="1" start="1">
<LI><br><a href="an_image"><img src="thumbnail_img"></a><br><a
href="some_page.html">page_title</a></li>
....
</OL>
</div>
<div class="OLC">
.....same as above
</div>
[/HTML]

I want to have columns of thumbnails numbered and horizontally
aligned.
Well, it works right in FF and OP but not in IE6-7.

Instead of:
number
image
link-name

it gives:
        image
        link-name
  1

If I remove "height:160px" for LI, it works but I lose the horiz
alignment.

What to do to have IE work properly ??

Thanks
Jukka K. Korpela - 27 Apr 2007 11:22 GMT
Scripsit Bill:

> In a css page I have the following:

Why don't you post the URL?

> <div class="OLC">
> <OL type="1" start="1">
> <LI><br><a href="an_image"><img src="thumbnail_img"></a><br><a
> href="some_page.html">page_title</a></li>
> ....
> </OL>

Why are you using the apparently redundant div element? Why are you using
invalid markup (img with no alt)? Why do you think (in the markup and in the
heading, but not in the text your message) that type="1" (the default) is
essential here? Why are you using <br> (and not CSS) apparantly to create
vertical spacing at the start of a list item?

> I want to have columns of thumbnails numbered and horizontally
> aligned.

What do you mean by "horizontally aligned"? Do you want to use a table but
refrain from doing so?

> If I remove "height:160px" for LI, it works but I lose the horiz
> alignment.

I have a feeling that the height of your images might matter too. But you
gave no URL.

Signature

Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Bill - 28 Apr 2007 14:03 GMT
Hi

> Why don't you post the URL?
because it's not on an intranet.

> > <div class="OLC">
> > <OL type="1" start="1">
[quoted text clipped - 4 lines]
>
> Why are you using the apparently redundant div element? Why are you using

It was there because at first it was used to enclose other objects too
which were later removed but the div stayed. But it doen't make any
difference for the OL.

> invalid markup (img with no alt)? Why do you think (in the markup and in the

The image is self explanatory.

> heading, but not in the text your message) that type="1" (the default) is
> essential here? Why are you using <br> (and not CSS) apparantly to create
> vertical spacing at the start of a list item?

To have the index, the image and the link superposed.

> I have a feeling that the height of your images might matter too. But you

You're right, I fixed the height of the images and added
overflow:hidden, removed the height property from LI and it worked.

Thanks Jukka
Jukka K. Korpela - 28 Apr 2007 14:30 GMT
Scripsit Bill:

>> Why don't you post the URL?
> because it's not on an intranet.

Really? Why would that matter? What matters is that you post a URL pointing
to a document on the Internet, the World Wide Web, also called "www". (Did
you notice it in the name of this group?)

>> Why are you using the apparently redundant div element? Why are you
>> using
>
> It was there because at first it was used to enclose other objects too
> which were later removed but the div stayed. But it doen't make any
> difference for the OL.

When trying to debug something, the first step should be to remove redundant
complexities. Then you could start removing complexities that you actually
need, in order to see which of them triggers the problem.

>> invalid markup (img with no alt)? Why do you think (in the markup
>> and in the
>
> The image is self explanatory.

To a person who does not see it? Do you have any idea of why alt attributes
are needed?

>> heading, but not in the text your message) that type="1" (the
>> default) is essential here? Why are you using <br> (and not CSS)
>> apparantly to create vertical spacing at the start of a list item?
>
> To have the index, the image and the link superposed.

Try re-reading my question, paying attention to the "and not CSS" part.
Using <br> is a coarse and unreliable way of affecting vertical spacing -
and we _are_ in a CSS group.

> You're right, I fixed the height of the images and added
> overflow:hidden, removed the height property from LI and it worked.

Too bad we cannot see whether you really fixed a problem or created a new
one.

Signature

Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 
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



©2009 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.