I'm looking to insert some additional content before the first input field in the provided HTML markup without making any changes to the existing structure. I want to achieve this using the :before pseudo-element.
Although I've attempted to do so, my current approach doesn't seem to be working:
HTML:
<p class="submit">
<input id="submit" type="submit" value="Post" name="submit">
<input id="" type="hidden" value="" name="">
</p>
CSS:
.submit input:before{
content:"Test ";
}
While the above code snippet may work, I specifically want the added content to be within .submit:
.submit:before{
content:"Test ";
}
Check out a live demo here: http://jsfiddle.net/gb2wY/