Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The problem is with the element name (the '.p' in the example). Because I have many predefined CSS elements, I need to make sure that my element name is original and not already in use. The sub contains the predefined CSS in a heredoc..p {text-align: left;}
Also the new element name correlates with a value passed into the sub. So if someone says:
Then in some_sub, I need to create distinct CSS elements that somehow correlate to 'foo' and 'bar' respectively. (But I can't name them '.foo' and '.bar')some_sub(foo, bar);
How best to do this?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dynamically creating CSS elements
by GrandFather (Saint) on Oct 18, 2005 at 22:45 UTC | |
|
Re: Dynamically creating CSS elements
by Cody Pendant (Prior) on Oct 19, 2005 at 03:58 UTC |