Hello,
I have the following:
<ol id ="ol">
<li id="li1">item1</li>
<li id="li2">item2</li>
<ol>
Is it possible to display the List Items on the horizontal, i.e., side
by side instead of one List Item per line?
And can I make li1 Width = 20% and li2 Width = 80%?
How can I do this using CSS?
Thanks,
Miguel 20 2874
On Jun 3, 2:49 pm, shapper <mdmo...@gmail.comwrote:
Is it possible to display the List Items on the horizontal, i.e., side
by side instead of one List Item per line?
use a UL and
display:inline-block;
or
float:left
on LIs
And can I make li1 Width = 20% and li2 Width = 80%?
#li1{width:20%}
#li2{width:80%} ??
In article
<11********************@a26g2000pre.googlegroups.c om>,
"scripts.contact" <sc*************@gmail.comwrote:
On Jun 3, 2:49 pm, shapper <mdmo...@gmail.comwrote:
Is it possible to display the List Items on the horizontal, i.e., side
by side instead of one List Item per line?
use a UL and
display:inline-block;
or
float:left
on LIs
Perhaps you might give an example using these alternatives you
mention.
--
dorayme
On Jun 3, 7:56 pm, dorayme <doraymeRidT...@optusnet.com.auwrote:
Is it possible to display the List Items on the horizontal, i.e., side
by side instead of one List Item per line?
use a UL and
display:inline-block;
or
float:left
on LIs
Perhaps you might give an example using these alternatives you
mention.
-HTML-
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 5</li>
<li>Item 6</li>
</ul>
-STYLE-
li {display:inline-block;border:1px dotted gray}
dorayme wrote:
In article
<11********************@a26g2000pre.googlegroups.c om>,
"scripts.contact" <sc*************@gmail.comwrote:
>On Jun 3, 2:49 pm, shapper <mdmo...@gmail.comwrote:
>>Is it possible to display the List Items on the horizontal, i.e., side by side instead of one List Item per line?
use a UL and display:inline-block; or float:left on LIs
Perhaps you might give an example using these alternatives you
mention.
LI { display: inline; }
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO http://www.LittleWorksStudio.com
Scripsit scripts.contact:
>Perhaps you might give an example using these alternatives you mention.
- -
li {display:inline-block;border:1px dotted gray}
Perhaps next time you will actually test your proposed solution before
posting it, _at least_ on the dominant browser.
--
Jukka K. Korpela ("Yucca") http://www.cs.tut.fi/~jkorpela/
On 2007-06-03, shapper <md*****@gmail.comwrote:
Hello,
I have the following:
<ol id ="ol">
<li id="li1">item1</li>
<li id="li2">item2</li> <ol>
Is it possible to display the List Items on the horizontal, i.e., side
by side instead of one List Item per line?
Setting display: inline on the list items will do that.
And can I make li1 Width = 20% and li2 Width = 80%?
But you can't set width on inlines, so make them float: left instead. If
they have any borders, padding or margin you'll need to make the total
add up to a bit less than 100%.
Inline-block would be ideal, but isn't supported by Firefox.
On Jun 3, 10:24 pm, "Jonathan N. Little" <lws4...@centralva.net>
wrote:
On Jun 3, 2:49 pm, shapper <mdmo...@gmail.comwrote: Is it possible to display the List Items on the horizontal, i.e., side by side instead of one List Item per line?
use a UL and
display:inline-block;
or
float:left
on LIs
Perhaps you might give an example using these alternatives you
mention.
LI { display: inline; }
but then you cant set width .
In article
<11**********************@r19g2000prf.googlegroups .com>,
"scripts.contact" <sc*************@gmail.comwrote:
On Jun 3, 7:56 pm, dorayme <doraymeRidT...@optusnet.com.auwrote:
Is it possible to display the List Items on the horizontal, i.e., side
by side instead of one List Item per line?
use a UL and
display:inline-block;
or
float:left
on LIs
Perhaps you might give an example using these alternatives you
mention.
-HTML-
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 5</li>
<li>Item 6</li>
</ul>
-STYLE-
li {display:inline-block;border:1px dotted gray}
This is not an ordered list. I asked because while the ul one is
quite straightforward, the <olone is just that more tricky to
get right, no? To get the numbers in too remember... and to look
reasonable.
--
dorayme
On Jun 4, 10:40 am, dorayme <doraymeRidT...@optusnet.com.auwrote:
In article
<1180924483.736184.314...@r19g2000prf.googlegroups .com>,
"scripts.contact" <scripts.cont...@gmail.comwrote:
On Jun 3, 7:56 pm, dorayme <doraymeRidT...@optusnet.com.auwrote:
Is it possible to display the List Items on the horizontal, i.e., side
by side instead of one List Item per line?
use a UL and
display:inline-block;
or
float:left
on LIs
Perhaps you might give an example using these alternatives you
mention.
-HTML-
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 5</li>
<li>Item 6</li>
</ul>
-STYLE-
li {display:inline-block;border:1px dotted gray}
This is not an ordered list. I asked because while the ul one is
quite straightforward, the <olone is just that more tricky to
get right, no? To get the numbers in too remember... and to look
reasonable.
--
dorayme
Hi,
I just found this web site: http://css.maxdesign.com.au/listamatic/
Really nice.
Thanks,
Miguel
shapper wrote:
>
<ol id ="ol">
<li id="li1">item1</li>
<li id="li2">item2</li>
<ol>
Is it possible to display the List Items on the horizontal
FYI, whatever method is used to make an ordered list horizontal, the
list marker (i.e. the number) won't be part of it.
--
Berg
In article <5c*************@mid.individual.net>,
Bergamot <be******@visi.comwrote:
shapper wrote:
<ol id ="ol">
<li id="li1">item1</li>
<li id="li2">item2</li>
<ol>
Is it possible to display the List Items on the horizontal
FYI, whatever method is used to make an ordered list horizontal, the
list marker (i.e. the number) won't be part of it.
At least if it has to be pretty and this can't be polished up
(but it is _a_ horiz ordered list with numbers and supplied by
the <ol>):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=iso-8859-1">
<title>ol and numbers horiz</title>
<style type="text/css">
* {margin:0; padding:0;}
ol {padding-left: 50px;}
li {
float:left;
margin-top: .2em;
margin-right: 1.3em;
padding-right: .4em;
padding-left: 0px;
border-right: 2px solid #666;
}
li.last {border-right: 0;}
</style>
</head>
<body>
<ol>
<li>Mask</li>
<li>Gun</li>
<li>Bank</li>
<li>Police</li>
<li>Court</li>
<li class="last">Jail</li>
</ol>
</body>
</html>
--
dorayme
In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:
In article <5c*************@mid.individual.net>,
Bergamot <be******@visi.comwrote:
shapper wrote:
>
Is it possible to display the List Items on the horizontal
FYI, whatever method is used to make an ordered list horizontal, the
list marker (i.e. the number) won't be part of it.
or nicer, really:
<style type="text/css">
* {margin:0; padding:0;}
ol {padding-left: 50px;}
li {
float:left;
margin-top: .2em;
margin-right: 2.3em;
padding-right: .4em;
}
</style>
</head>
<body>
<ol>
<li>Mask;</li>
<li>Gun;</li>
<li>Bank;</li>
<li>Police;</li>
<li>Court;</li>
<li>Jail</li>
</ol>
</body>
</html>
--
dorayme
dorayme wrote:
>
(but it is _a_ horiz ordered list with numbers and supplied by
the <ol>):
Try it in IE and see what happens.
--
Berg
Bergamot wrote:
dorayme wrote:
>(but it is _a_ horiz ordered list with numbers and supplied by the <ol>):
Try it in IE and see what happens.
File that under "Wow this works great!*"
* except in MSIE
You have to admit that flipping * gets tiresome! Then you have to take a
simple and elegant solution a muck it with an IE-workaround.
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO http://www.LittleWorksStudio.com
On 2007-06-04, dorayme <do************@optusnet.com.auwrote:
In article <11**********************@r19g2000prf.googlegroup s.com>,
"scripts.contact" <sc*************@gmail.comwrote:
>On Jun 3, 7:56 pm, dorayme <doraymeRidT...@optusnet.com.auwrote:
Is it possible to display the List Items on the horizontal, i.e., side
by side instead of one List Item per line?
use a UL and
display:inline-block;
or
float:left
on LIs
Perhaps you might give an example using these alternatives you
mention.
-HTML-
<ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li>Item 4</li> <li>Item 5</li> <li>Item 6</li> </ul>
-STYLE-
li {display:inline-block;border:1px dotted gray}
This is not an ordered list. I asked because while the ul one is
quite straightforward, the <olone is just that more tricky to
get right, no? To get the numbers in too remember... and to look
reasonable.
If you change the display on li to anything other than display:
list-item, the list item markers (bullets for an <olnumbers of some
kind for a <ul>) should disappear.
If you float the list items but leave them as display: list-item, you
should keep the markers (according to CSS 2.1 9.7) although neither
Opera nor Konqueror do.
Firefox does but it doesn't put them in a particularly helpful place.
So yes a horizontal <olis not easy to do. Neither is a horizontal <ul>
if you still want the bullets.
In article <5c*************@mid.individual.net>,
Bergamot <be******@visi.comwrote:
dorayme wrote:
(but it is _a_ horiz ordered list with numbers and supplied by
the <ol>):
Try it in IE and see what happens.
I take your word for it.
--
dorayme
In article <sl*********************@bowser.marioworld>,
Ben C <sp******@spam.eggswrote:
On 2007-06-04, dorayme
This is not an ordered list. I asked because while the ul one is
quite straightforward, the <olone is just that more tricky to
get right, no? To get the numbers in too remember... and to look
reasonable.
So yes a horizontal <olis not easy to do. Neither is a horizontal <ul>
if you still want the bullets.
Yes, I am sure you are right. I was thinking that it would be
unlikely for someone to be wanting the bullets in a horiz list.
But a little more liklihood wanting numbers for the ol one. I
assume that mostly people choose ol rather than ul for more than
some pure html semantic reason, they want the numbers!
They are a devil to code for with numbers and "border" separators
even in the browsers that show the numbers. When I messed about
with them, I found it simpler to forget about separators, beyond
perhaps a ";" after the text in each <li></li>.
I suppose I better fire up my Winbox and see what old Bergamot is
saying about IE. (I use him shamelessly to learn things, he does
not realise it, which is how I like it. But ssshhhh!)
--
dorayme
On 2007-06-05, dorayme <do************@optusnet.com.auwrote:
In article <sl*********************@bowser.marioworld>,
Ben C <sp******@spam.eggswrote:
>On 2007-06-04, dorayme
This is not an ordered list. I asked because while the ul one is
quite straightforward, the <olone is just that more tricky to
get right, no? To get the numbers in too remember... and to look
reasonable.
So yes a horizontal <olis not easy to do. Neither is a horizontal <ul> if you still want the bullets.
Yes, I am sure you are right. I was thinking that it would be
unlikely for someone to be wanting the bullets in a horiz list.
But a little more liklihood wanting numbers for the ol one. I
assume that mostly people choose ol rather than ul for more than
some pure html semantic reason, they want the numbers!
Exactly. People quite often use display: inline on floated list-items to
lose the bullets. list-style: none (or something similar to that) is
also good but might not work in IE.
They are a devil to code for with numbers and "border" separators
even in the browsers that show the numbers. When I messed about
with them, I found it simpler to forget about separators, beyond
perhaps a ";" after the text in each <li></li>.
The spec doesn't define precisely where "outside" positioned list item
markers go so if you want to change the layout of the list much from the
normal vertical style it's probably better to do the numbers yourself
(in spans or something) and then you have more control over them.
In article <sl*********************@bowser.marioworld>,
Ben C <sp******@spam.eggswrote:
On 2007-06-05, dorayme <do************@optusnet.com.auwrote:
In article <sl*********************@bowser.marioworld>,
Ben C <sp******@spam.eggswrote:
On 2007-06-04, dorayme
They are a devil to code for with numbers and "border" separators
even in the browsers that show the numbers. When I messed about
with them, I found it simpler to forget about separators, beyond
perhaps a ";" after the text in each <li></li>.
The spec doesn't define precisely where "outside" positioned list item
markers go so if you want to change the layout of the list much from the
normal vertical style it's probably better to do the numbers yourself
(in spans or something) and then you have more control over them.
Yes. Or in a table for a very short ordered list (where wrapping
is unlikely to be an issue).
I once argued that an ordered list was in some sense equivalent
to a 2 col table, the left col containing the order and the right
the corresponding content, row by row, thus being tabular in its
heart of hearts. But any idea of presenting an ordered list in a
horizontal manner makes me think that a one row table would not
be an obviously helpful substitute. Because the logical
relationships between the cells with numbers and the cells with
corresponding content would be in pairs that are just a bit
harder to describe or be evident - "count in pairs from the first
cell", the voice reader pauses at the end of the pairs...
--
dorayme
On 2007-06-06, dorayme <do************@optusnet.com.auwrote:
In article <sl*********************@bowser.marioworld>,
Ben C <sp******@spam.eggswrote:
>On 2007-06-05, dorayme <do************@optusnet.com.auwrote:
In article <sl*********************@bowser.marioworld>,
Ben C <sp******@spam.eggswrote:
On 2007-06-04, dorayme
They are a devil to code for with numbers and "border" separators
even in the browsers that show the numbers. When I messed about
with them, I found it simpler to forget about separators, beyond
perhaps a ";" after the text in each <li></li>.
The spec doesn't define precisely where "outside" positioned list item markers go so if you want to change the layout of the list much from the normal vertical style it's probably better to do the numbers yourself (in spans or something) and then you have more control over them.
Yes. Or in a table for a very short ordered list (where wrapping
is unlikely to be an issue).
I once argued that an ordered list was in some sense equivalent
to a 2 col table, the left col containing the order and the right
the corresponding content, row by row, thus being tabular in its
heart of hearts. But any idea of presenting an ordered list in a
horizontal manner makes me think that a one row table would not
be an obviously helpful substitute. Because the logical
relationships between the cells with numbers and the cells with
corresponding content would be in pairs that are just a bit
harder to describe or be evident - "count in pairs from the first
cell", the voice reader pauses at the end of the pairs...
You could nest the tables so each pair was in its own table. Better
though would just be to use inside list item markers, e.g.
li
{
list-style-position: inside;
float: left;
margin-right: 1em;
border: 1px dashed gray;
}
It perhaps should be pointed out that float: left will put the items in
the wrong order if direction is set to rtl. Table cells however will go
right to left depending on the value of direction (or the HTML dir
atttribute). This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jim Cobban |
last post by:
I cannot get Netscape 4.79 to properly display the ordered list in the
following fragment.
<P>Get a specific portion of the date.
Depending upon the value of index:
<ol start=0>
<li>complete...
|
by: Christoph Zwerschke |
last post by:
This is probably a FAQ, but I dare to ask it nevertheless since I
haven't found a satisfying answer yet: Why isn't there an "ordered
dictionary" class at least in the standard list? Time and again...
|
by: Fuzzyman |
last post by:
Sorry for this hurried message - I've done a new implementation of out
ordered dict. This comes out of the discussion on this newsgroup (see
blog entry for link to archive of discussion).
See...
|
by: bearophileHUGS |
last post by:
>From this interesting blog entry by Lawrence Oluyede:
http://www.oluyede.org/blog/2006/07/05/europython-day-2/
and the Py3.0 PEPs, I think the people working on Py3.0 are doing a
good job, I am...
|
by: rllioacvuher |
last post by:
I need help with a program. I have implemented that following header file with an unordered list using one array, but i need to be able to use an ordered list and 2 arrays (one for the links and one...
|
by: Lee Brotzman |
last post by:
Hi,
I have a sequence of data tables in an ordered list, like this:
<ol>
<li><table></table></li>
<li><table></table></li>
</ol>
However it renders on the page with the list item number...
|
by: Andreas Prilop |
last post by:
To get bold numbers in ordered lists, one can write
ol { font-weight: bold }
ol span { font-weight: normal }
<ol>
<li><span>......</span></li>
<li><span>......</span></li>
</ol>
|
by: some old html fumbler |
last post by:
I want to use CSS to get an ordered list to start with something other
than a 1 or equivalent.
I have a list of things that happen during the course of a year. Too
long a list is not helpful, so...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: GKJR |
last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
| |