Hi,
Is there a way to set the distance between the items in a list that I can
put in the <ul> or <ol> tag?
I suppose that using margin in the <li> tag will work but the endless
repetition seems to me rather unelegant and a waste of bandwidth.
I don't use a stylesheet file, but want to implement it with "style=" in the
tag.
Thanks,
Wim 14 9628
"Wim Roffil" <wimroffel@please_no_spam-planet.nl> writes: Is there a way to set the distance between the items in a list that I can put in the <ul> or <ol> tag?
I suppose that using margin in the <li> tag will work but the endless repetition seems to me rather unelegant and a waste of bandwidth.
I don't use a stylesheet file, but want to implement it with "style=" in the tag.
This can only be done without repetition in a stylesheet. It can't be
done with style attributes on a tag.
li { ... } /* All li */
ul.reasons li { ... } /* All li in a <ul class="reasons"> */
This is why a stylesheet is the best approach.
Is there any reason you can't use a stylesheet file? A second-best
approach is to put an inline stylesheet in the HTML. It's still
unnecessary repetition, though, if it's at all avoidable.
--
Chris
Wim Roffil wrote: Hi,
Is there a way to set the distance between the items in a list that I can put in the <ul> or <ol> tag?
I suppose that using margin in the <li> tag will work but the endless repetition seems to me rather unelegant and a waste of bandwidth.
I don't use a stylesheet file, but want to implement it with "style=" in the tag.
Thanks, Wim
I suggest using a style block in the head element, but why you do not
want to use a stylesheet file when you are concerned with bandwith usage
and elegancy is a mystery to me.
Try this:
<!DOCTYPE ... your doctype declaration ...>
<html>
<head>
< .. your head tags.. >
<style>
li {margin-left: 0.5em;}
</style>
</head>
<body>
<ul>
<li>Listitem with 0.5em left margin</li>
<li>Listitem with 0.5em left margin</li>
<li>Listitem with 0.5em left margin</li>
<li>Listitem with 0.5em left margin</li>
</ul>
</body>
</html>
in comp.infosystems. www.authoring.stylesheets, Wim Roffil wrote: Hi,
Is there a way
Yes.
I suppose that using margin in the <li> tag will work
Yes
but the endless repetition seems to me rather unelegant and a waste of bandwidth.
Yes
I don't use a stylesheet file, but want to implement it with "style=" in the
You know solution good solution, you know bad solution, and you don't
want to use good solution, but bad one. There is nothing we can do.
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
In article <d0**********@reader13.wxs.nl>, wimroffel@please_no_spam-
planet.nl says... Hi,
Is there a way to set the distance between the items in a list that I can put in the <ul> or <ol> tag?
I suppose that using margin in the <li> tag will work but the endless repetition seems to me rather unelegant and a waste of bandwidth.
I don't use a stylesheet file, but want to implement it with "style=" in the tag.
Thanks, Wim
Hard way, add to each tag:
<li style="line-height:1em;">
Easier way - Add line height or margin to the style tags within the head
tags:
<style type="text/css">
<!--
li { line-height:1em; }
-->
</style>
or
<style type="text/css">
<!--
li { margin-top:1em; }
-->
</style>
Use a stylesheet. It's much easier and changes will be global. What if
you add this list to another page? You'd have to redo this on the new
page.
in comp.infosystems. www.authoring.stylesheets, saz wrote: In article <d0**********@reader13.wxs.nl>, wimroffel@please_no_spam- planet.nl says... Hi,
Is there a way to set the distance between the items in a list that I can put in the <ul> or <ol> tag?
Hard way, add to each tag:
<li style="line-height:1em;">
Why are you using line height? It means space between lines. That
includes also between lines in list item, which is not wanted:
* foobar akdfnlsk fnsrke gre
re esfrks rkesh seht ge
* jdsfbskfzsbvfk
When line-height:2. Better:
* foobar akdfnlsk fnsrke gre
re esfrks rkesh seht ge
* jdsfbskfzsbvfk
This is with margin: 1em 0;
Much better to use margin. (and in case of using line height, it would
make more sence to use it for ul or ol...)
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
In article <MP************************@news.individual.net> , la***@raittila.cjb.net says... in comp.infosystems.www.authoring.stylesheets, saz wrote: In article <d0**********@reader13.wxs.nl>, wimroffel@please_no_spam- planet.nl says... Hi,
Is there a way to set the distance between the items in a list that I can put in the <ul> or <ol> tag?
Hard way, add to each tag:
<li style="line-height:1em;">
Why are you using line height? It means space between lines. That includes also between lines in list item, which is not wanted:
* foobar akdfnlsk fnsrke gre
re esfrks rkesh seht ge
* jdsfbskfzsbvfk
When line-height:2. Better:
* foobar akdfnlsk fnsrke gre re esfrks rkesh seht ge
* jdsfbskfzsbvfk
This is with margin: 1em 0;
Much better to use margin. (and in case of using line height, it would make more sence to use it for ul or ol...)
I was just giving options. I've used both, and choose by what gives the
better results.
"saz" <sa*****@nospammersexcite.com> schreef in bericht
news:MP***********************@news.comcast.gigane ws.com... <style type="text/css"> <!-- li { margin-top:1em; } --> </style>
I was hoping this could be translated in the tag in something like <ol
style="li.margin-height:1em">
Use a stylesheet. It's much easier and changes will be global. What if you add this list to another page? You'd have to redo this on the new page.
I have a big website with one stylesheet. This style element is for one
rather small category. I don't think that every exception should be loaded
into the stylesheet.
Wim
On Fri, 11 Mar 2005, saz wrote: <style type="text/css"> <!-- li { line-height:1em; } --> </style>
Don't include the faux "comment" markers if you're trying to write
XHTML.
Even in HTML, this feature is ancient history by now. Browsers were
at least *understanding* how to parse a style element by HTML/3.2 at
the latest (even those which didn't choose to support stylesheets).
The old browser/versions which still would need the "comment" markers
pre-date the introduction of the Host: header in HTTP requests, so
such browsers would be practically useless on today's web anyway.
Preferably, anyway, use an external stylesheet.
"Wim Roffil" <wimroffel@please_no_spam-planet.nl> writes: "saz" <sa*****@nospammersexcite.com> schreef in bericht news:MP***********************@news.comcast.gigane ws.com... Use a stylesheet. It's much easier and changes will be global. What if you add this list to another page? You'd have to redo this on the new page.
I have a big website with one stylesheet. This style element is for one rather small category. I don't think that every exception should be loaded into the stylesheet.
Inside that category, and only in the pages in that category, have
<link rel="stylesheet" type="text/css" href="/css/main-stylesheet.css">
<link rel="stylesheet" type="text/css" href="/css/category4-stylesheet.css">
Outside the category, just have
<link rel="stylesheet" type="text/css" href="/css/main-stylesheet.css">
The category specific stylesheet contains the exceptions. If your site
generation tool doesn't let you have a slightly different template for
that section, it's time to get a better site generation tool.
Note that, unless the exceptions are quite large - 5k of CSS or more,
perhaps - you're probably better just putting them in the main
stylesheet.
--
Chris
In article <d0**********@reader08.wxs.nl>, wimroffel@please_no_spam-
planet.nl says... "saz" <sa*****@nospammersexcite.com> schreef in bericht news:MP***********************@news.comcast.gigane ws.com... <style type="text/css"> <!-- li { margin-top:1em; } --> </style>
I was hoping this could be translated in the tag in something like <ol style="li.margin-height:1em">
Use a stylesheet. It's much easier and changes will be global. What if you add this list to another page? You'd have to redo this on the new page.
I have a big website with one stylesheet. This style element is for one rather small category. I don't think that every exception should be loaded into the stylesheet.
Wim
Why not? That's why you have a stylesheet. Add a class for this list.
<div class="list">
<ol>
<li>item1</li>
<li>item 2</li>
</ol>
</div>
or use <ol class="list"> either way will work
Add to your stylesheet:
..list li{ margin-top:1em; }
Why are you trying to make it more difficult than it has to be?
*saz* <sa*****@nospammersexcite.com>: Why not? That's why you have a stylesheet. Add a class for this list.
ACK.
<div class="list"><ol>(...) or use <ol class="list"> either way will work
Why the "or"? Why would one add yet another superfluous 'div' just to add
a class?
--
"You cannot make a man by standing a sheep on its hind legs.
But by standing a flock of sheep in that position you can make a crowd of men."
Max Beerbohm
In article <op**************@crissov.de>, ch**************@nurfuerspam.de says... *saz* <sa*****@nospammersexcite.com>: Why not? That's why you have a stylesheet. Add a class for this list.
ACK.
<div class="list"><ol>(...) or use <ol class="list"> either way will work
Why the "or"? Why would one add yet another superfluous 'div' just to add a class?
Because the OP seems to prefer the hard way of doing this.
In article <Pi******************************@ppepc56.ph.gla.a c.uk>, fl*****@ph.gla.ac.uk says... On Fri, 11 Mar 2005, saz wrote:
<style type="text/css"> <!-- li { line-height:1em; } --> </style>
Don't include the faux "comment" markers if you're trying to write XHTML.
Even in HTML, this feature is ancient history by now. Browsers were at least *understanding* how to parse a style element by HTML/3.2 at the latest (even those which didn't choose to support stylesheets). The old browser/versions which still would need the "comment" markers pre-date the introduction of the Host: header in HTTP requests, so such browsers would be practically useless on today's web anyway.
Old habits die hard. I just automatically add the comments. I can't
remember the last time I put style in the head tags, so I guess I should
erase it from memory.
Wim Roffil wrote: "saz" <sa*****@nospammersexcite.com> schreef in bericht news:MP***********************@news.comcast.gigane ws.com...
<style type="text/css"> <!-- li { margin-top:1em; } --> </style>
I was hoping this could be translated in the tag in something like <ol style="li.margin-height:1em">
Use a stylesheet. It's much easier and changes will be global. What if you add this list to another page? You'd have to redo this on the new page.
I have a big website with one stylesheet. This style element is for one rather small category. I don't think that every exception should be loaded into the stylesheet.
Wim
There is another option:
<link rel="stylesheet" type="text/css" href="/css/category4-stylesheet.css">
The first line in category4-stylesheet.css
@import url(main-stylesheet.css)
all styles in category-4 sheet will override main. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Brett L. Moore |
last post by:
Hi,
I have had trouble determining whether the STL list.size() operation
is O(1) or O(n). I know the list is a doubly-linked list, so if the
size() operation begins at the head, then counts to...
|
by: Jeff Thies |
last post by:
I'd like to return two values from a function. I'm doing this:
function getTwo(){
// some code
return new Array(value_a,value_b);
}
var returnArray=getTwo(some_var);
var...
|
by: maxmarengo |
last post by:
I am trying to write a query in Access (or SQL) that works on a table
like this:
Location Gridreference
Ben Nevis NQ1234512345
Ben Doon NQ1230012300
and so on for several thousand...
|
by: Robin Cole |
last post by:
I'd like a code review if anyone has the time. The code implements a basic
skip list library for generic use. I use the following header for debug
macros:
/*
public.h - Public declarations and...
|
by: MJ |
last post by:
Hi
I have a question
I have a singly linked list of 10 elements. I have to find the Nth (Ex
3rd element from the end) element from the end. What are the ways to
do it with less complexity
I...
|
by: JustSomeGuy |
last post by:
According to the docs...
http://www.cppreference.com/cpplist/sort.html
There is a parameter to the std::list.sort method.
I don't understand this methods use...
I want to sort the list which...
|
by: charles.hebert |
last post by:
Hi,
Can anybody tell me how to to find the nearest value to zero in a list
?
To do that, i'm using list comprenhension :
Something simpler ?
|
by: bilgekhan |
last post by:
After doing a succcessful insert() or find() on a set<Tcontainer
is it possible to get the item number of this item in the set?
(ie. its zero-based sequence number (position/location/rank/index)...
|
by: Gabriel Genellina |
last post by:
En Fri, 26 Sep 2008 01:42:59 -0300, Chris Rebert <clp@rebertia.com>
escribió:
I think the above expression is overcomplicated. The code below does the
exact same thing and is easier to...
|
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...
|
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,...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |