G'day adambot,
In CSS, #identifier indicates a unique identifier which, in HTML, would be represented by an attribute that looks like id="identifier".
From http://www.w3.org/TR/css3-selectors/#id-selectors:
Document languages may contain attributes that are declared to be of type ID. What makes attributes of type ID special is that no two such attributes can have the same value in a conformant document, regardless of the type of the elements that carry them; whatever the document language, an ID typed attribute can be used to uniquely identify its element. In HTML all ID attributes are named "id"; XML applications may name ID attributes differently, but the same restriction applies.
I viewed the source of http://puzzledragonx.com/en/monster.asp?n=1645 and searched for 'tableprofile'. I stopped searching when I found a second id="tableprofile" (there might be more). Given that '#tableprofile' should be a unique identifier, but isn't, may be the root cause of your problem.
I'm not a user of Mojo::DOM; however, I see from its DESCRIPTION:
"... It will even try to interpret broken HTML ..."
Accordingly, you may be able to find a workaround by formulating a selector which does not include '#tableprofile'. Do note: that's just a guess on my part!
Furthermore, I'd be questioning any other supposedly unique identifiers in selectors provided by a browser. A simple search of the HTML source (as I did) is a quick and easy way to do this.
The full W3C specification is "Selectors Level 3" and is a fairly lengthy document. I rarely need to reference more than the "Summary Table of Selectors": there's plenty of links to more information if you need them.
— Ken
In reply to Re: CSS Selector in Perl
by kcott
in thread CSS Selector in Perl
by adambot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |