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 798241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:56:17+00:00 2026-05-14T22:56:17+00:00

I have a web service where people can edit their pages CSS, but I

  • 0

I have a web service where people can edit their pages CSS, but I have a bar on the footer of that page that I want to make consistend on every page…

People are, right now, able to “remove” it with CSS and I really didn’t want to go and parse the CSS to remove rules related to that bar… Is there a way to preserve the styles or re-aply them after load to keep the bar always visible?

  • 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-14T22:56:18+00:00Added an answer on May 14, 2026 at 10:56 pm

    If you modify the user-created CSS as you save it; adding descendant selectors to all their rules, you can limit the effect of their styles to an element of your choosing. If you take this HTML:

    <html>
      <body>
        <div id="userEditableArea">
          <h2>Stylable</h2>
          <p>Users can style this section.</p>
        </div>
        <div id="footerBar">
          Users can't style this section.
        </div>
      </body>
    </html>
    

    The user creates the following stylesheet, trying to hide your footer:

    h2 {font-size:2em;}
    p {font-color:#333;}
    #footerBar {display:none;}
    

    When the user saves their styles, you parse through and add #userEditableArea to all of their rules, so they only work on elements inside <div id="userEditableArea">. This should be pretty easy to accomplish with a regex pass or two.

    #userEditableArea h2 {font-size:2em;}
    #userEditableArea p {font-color:#333;}
    #userEditableArea #footerBar {display:none;}
    

    Anything you don’t want them to mess with, put outside of #userEditableArea.

    This should be pretty robust – more so than using !important rules or high-specificity selectors, and doesn’t require any JS.

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

Sidebar

Related Questions

I want to provide a service on the web that people can test out
I have web service which i want to use to upload image to the
I have web service urls that were working fine and are now returning the
I have web service, which use integrated security in IIS. Now, I want to
I have a web service that returns this string via the jQuery $.ajax() call
I have REST Web service written in Java. Now I want to disable Web
I have to implement a web service in my work, the problem is that
I have a legacy CGI web service that returns XML. I have added logging
I have a WCF Ajax enabled web service that I call via jquery. It
I have a REST web-service interface that calls-down to a service layer which orchestrates

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.