I'm struggling with the CSS counter mechanism(s)

  • Thread starter Thread starter s3a
  • Start date Start date
  • Tags Tags
    Counter Css
Click For Summary
SUMMARY

The discussion centers on the challenges of implementing CSS counters for ordered lists, specifically when transitioning from one row to another. The user is attempting to achieve continuous numbering in an ordered list but encounters issues with duplicate numbering in table cells. Key resources referenced include the W3Schools CSS counter documentation and a tutorial from MDN. The user expresses confusion over naming counters, believing that only "section" and "subsection" can be used.

PREREQUISITES
  • Understanding of CSS counters and their syntax
  • Familiarity with HTML ordered lists and table structures
  • Basic knowledge of CSS selectors and properties
  • Experience with debugging CSS issues
NEXT STEPS
  • Study the CSS counter properties in detail, focusing on "counter-increment" and "counter-reset"
  • Explore the MDN tutorial on CSS Lists and Counters for practical examples
  • Experiment with different counter names and their effects on ordered lists
  • Learn about the CSS display property and its impact on list rendering within table cells
USEFUL FOR

Web developers, front-end designers, and anyone looking to master CSS counters for dynamic list numbering in web applications.

s3a
Messages
828
Reaction score
8

Homework Statement


There's a visual representation of what I am aiming for, in Question 1's Figure 2.:
https://www.docdroid.net/P6VZNB1/soe...df.html#page=3

Homework Equations


https://www.w3schools.com/CSSref/pr_gen_counter-increment.asp

The Attempt at a Solution


Hello to everyone who's reading this.
icon_smile.gif


I looked at various websites, including several YouTube videos, but still I'm really struggling with CSS counter stuff. Basically, all I am trying to do is to make the numbering of an ordered list continue when the ordered list goes from row n to row n+1.

The following is my HTML syntax.:
http://pastebin.com/hw8rmUWB

The following is my CSS syntax, where the last three selectors are what I'm struggling with (as indicated by the comment).:
http://pastebin.com/cYFynxAs

Could someone please help me figure out why the numbering is showing twice in each table cell (despite the CSS incrementation seemingly working semi-correctly)? It seems like the CSS is creating some different numbering, rather than modifying the default numbering of unordered lists.

Any help in figuring out why what I am trying to accomplish is not working would be GREATLY appreciated!
 
Last edited by a moderator:
Physics news on Phys.org

Similar threads

Replies
12
Views
2K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K