Hi all,
I have succeeded with css numbering. But now, I would like to be able to reference to the whole numbering (like Figure 1). Here is the code:
I would like the reference to be printed out (automatically of course): "Here is a reference to an SVG, see Figure 1.
Is this possible in html/css?
And how is it done?
Thanks!
/Johan
I have succeeded with css numbering. But now, I would like to be able to reference to the whole numbering (like Figure 1). Here is the code:
HTML:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test Report</title>
<style type="text/css">
body {
counter-reset: fignum;
}
body figcaption {
counter-increment: fignum 1;
}
body figcaption:before {
content: "Figure " counter(fignum) ". ";
}
</style>
</head>
<body>
<p>
<figure>
<img src="https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/car.svg"/>
<figcaption id="test_fig">A nice car made in SVG.</figcaption>
</figure>
</p>
<p>
Here is a reference to an SVG, see <a href="#test_fig"></a>.
</p>
</body>
</html>
I would like the reference to be printed out (automatically of course): "Here is a reference to an SVG, see Figure 1.
Is this possible in html/css?
And how is it done?
Thanks!
/Johan
