473,800 Members | 2,475 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to autonumber my blog's comments?

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.

Oct 3 '06 #1
2 2248
Scripsit Pa************@ gmail.com:
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.
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.
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.
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/

Oct 3 '06 #2
<Pa************ @gmail.comwrote in message
news:11******** **************@ m7g2000cwm.goog legroups.com...
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="backgrou nd: url(commentnum. php?n=1&col=E2E 8F4&bgcol=F3F6F C) 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
Oct 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2059
by: googleboy | last post by:
Hiya. I am looking at implementing a blog and a forum for a personal website. I am also beginning to look at growing my programming skills from newbie/mediocre to intermedaitely servicable and want to continue doing this focussing on python. It would be cool to find projects in python with code I can refer to. Regards,
1
1383
by: José Carlos Santos | last post by:
Hi all, I found this text at a blog: Well, one day I tried to come to my blog and found myself redirected to www.blogger.com, and try as I might, I couldn't get to my blog! I thought about it for a while, and wondered if someone had put a redirect in the comments, so I removed the comments, and found I could get to it.
33
7648
by: Steven Taylor | last post by:
Hope someone can help. This is half an Access question. The half I'm using is Access Xp as a backend data file. I'm using ODBC to connect to the data file. All commands are via SQL type statements (SELECT, UPDATE & INSERT INTO). (I'm using/trialling Realbasic as a frontend). After inserting a record (row) into a table using "INSERT INTO ...." what is the easiest way to obtain the value of a counter field for the record just...
4
1424
by: Dan Keeley | last post by:
Hi. I'm inserting a record into a DB, how do i get the value back of an AutoNumber field so i can use it in subsequent SQL statements? At the moment I have code vaguely like this: Dim selectCMD As OleDbCommand = New OleDbCommand("INSERT into AuditItems ( ParentAuditID, section, score, comments) values('1')", conn)
4
1937
by: Vinayak | last post by:
Dear Members I'm new here. Please permit me to ask some newbie question I'm from a non-profit organization, working for gender equality. We wish to get a small message across to sister blogs (blogs with a common thread, purpose) *I am SERIOUSLY AGAINST SPAM of any kind*
0
917
by: =?Utf-8?B?YWNlbnRyZWxsYQ==?= | last post by:
Whats the best way to go about adding a blog or comments to my site using vb.net... are there suggested reading materials or controls available? Thanks
1
3488
by: judacris | last post by:
I've seen the threads here about molding 2 divs in a centered fashion. but I can't seem to solve this thing. my blogger blog is functioning well on my site for now, but the blog feed (left) and the sidebar (right) doesn't center here's the css i'm modifying to center it. i apologise for the mess. <html> <head> <title>cris-kun's 'Blog - www.puff-x.com</title> <$BlogMetaData$>
7
1928
by: tuananh87vn | last post by:
I and some of my friends are going to write a blog like Yahoo! blog and I'm supposed to make "my blog" page, which includes something like the displayed blog content, comments and of course certain functions like compose blog entry, edit or delete... can anyone help me analyse this page and then the process? ah, and the text editor- like the one i'm using to format text in this forum- so where should I find it? I will try to finish the...
0
9691
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10505
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10253
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10035
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5471
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.