HighDots Forums  

How to autonumber my blog's comments?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss How to autonumber my blog's comments? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Papa.Legba.666@gmail.com
 
Posts: n/a

Default How to autonumber my blog's comments? - 10-02-2006 , 08:44 PM






Hi,

I am rather inexperienced with CSS. I was looking around and saw that
one can auto-number, so I though that I would like to use this on my
blog's comments.

There is a template for the comments, which will be used for all, so I
just need a single CSS definition.

What I was thinking of was putting the number in a large font, as
background, either in a faint colour, or partially opaque, or similar,
so that it shows through behind the darker foreground text, but can
still be seen.

Can some CSS guru help me?

Thanks very much in advance.


Reply With Quote
  #2  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: How to autonumber my blog's comments? - 10-03-2006 , 12:01 AM






Scripsit Papa.Legba.666 (AT) gmail (DOT) com:

Quote:
I was looking around and saw that
one can auto-number,
In practice, you cannot. The CSS constructs for that are too poorly
supported. Features that aren't supported by Internet Explorer are generally
not very useful on the WWW. Of course, if it's about a _minor_
presentational enhancement, you could do things theoretically right,
accepting the fact that it won't work in the great majority of browsing
situations.

Quote:
so I though that I would like to use this on my
blog's comments.
A blog with a commenting possibility is inherently an interactive system, so
you should make the _server-side_ component generate the numbering. Unless,
of course, you are satisfied with using just <ul>, and you probably aren't.

Quote:
There is a template for the comments, which will be used for all, so I
just need a single CSS definition.
No, you need to change the template.

Quote:
What I was thinking of was putting the number in a large font, as
background, either in a faint colour, or partially opaque, or similar,
so that it shows through behind the darker foreground text, but can
still be seen.
That would be an odd approach, and rather disturbing. The template should be
something like the following (if you want to have the comments numbered,
which might be a good idea for referencing purposes):

<h2 id="c{number}">{Heading of the comment as written by the user}</h2>
<div>Comment {number}</div>
<div>By {name}</div>
<p>Text of the comment ...

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



Reply With Quote
  #3  
Old   
Martin Eyles
 
Posts: n/a

Default Re: How to autonumber my blog's comments? - 10-03-2006 , 06:47 AM



<Papa.Legba.666 (AT) gmail (DOT) com> wrote

Quote:
Hi,

I am rather inexperienced with CSS. I was looking around and saw that
one can auto-number, so I though that I would like to use this on my
blog's comments.

There is a template for the comments, which will be used for all, so I
just need a single CSS definition.

What I was thinking of was putting the number in a large font, as
background, either in a faint colour, or partially opaque, or similar,
so that it shows through behind the darker foreground text, but can
still be seen.

Can some CSS guru help me?

Thanks very much in advance.

I've seen this done at http://www.peterjoel.com/

Taking a look at the code, they have set the style to

style="background: url(commentnum.php?n=1&col=E2E8F4&bgcol=F3F6FC) bottom
right no-repeat"

So they must use the server side scripting to insert this css (maybe your
blog template has a server side "tag" that can output the number of the
comment), and then a php script that generates the background image.

An alternative method that might be quite elegant (if it works - which it
may not) - maybe you can get the server side code to output an ordered list
of comments (rather than outputting divs ps uls or whatever), and then style
this somehow (as you already have the number, you just need to fiddle it's
positioning and colour).

Hope these get you started, but would be good to hear what your final
solution is.

ME




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.