Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7591737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:43:31+00:00 2026-05-30T20:43:31+00:00

The CSS content attribute allows me to modify the content of an element. Is

  • 0

The CSS content attribute allows me to modify the content of an element. Is it possible to modify an element such that its contents would be posted as part of a form, using pure CSS?

Example of what I want to do:

<style type="text/css">
    #sneaky:before {
        content: "Testing, testing!";
    }
</style>
...
<form action="foo.php" action="POST">
    <textarea name="data" id="sneaky"></textarea>
    <input type="submit" value="Send" />
</form>

According to several questions on this site, there’s no way to use :before and :after on input elements, but one comment did mention that textarea seems to behave specially.

Is there any way to modify form variables (via any element vector) using only CSS?

Note: This doesn’t have to be particularly cross-browser compatible, or reliable. I’m researching how different browsers behave and the tricks that each can be subjected to.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T20:43:33+00:00Added an answer on May 30, 2026 at 8:43 pm

    No, it’s not possible since :after and :before create pseudo elements that don’t alter input and textarea values in any way (and they’re neither seen in the DOM tree)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to have our web applications pull static content (css, js, images)
Possible duplicate: why does the css min-width attribute not force a div to hae
is it possible to change the value of an HTML attribute w/ CSS? I
Possible Duplicate: CSS 3 content selector? I couldn't find a way online to hide
I would like to design a web app that allows me to sort, browse,
Does the css content property break the rule of content and separation because css
How do you use the CSS content property to add HTML entities? Using something
Which browsers have support for CSS :before { content: x; }? I could not
<head runat=server> <title><asp:ContentPlaceHolder ID=TitleContent runat=server /></title> <link href=../../Content/css/layout.css rel=stylesheet type=text/css /> <script type=text/javascript src=/Areas/CMS/Content/js/jquery-1.3.2.min.js></script>
In my View, I have included the css : <link rel=stylesheet type=text/css href='<%=Url.Content(~/Content/login.css)%>'/> in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.