Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Edit CSS via a webpage script?

Featured Replies

Hi,

 

First of all not sure if this is the right place so sorry if its not! :)

 

Right what id like to do is to be able to edit a CSS style sheet via a browser but with a user friendly interface for my clients. Id like them to be able to edit mainly just colours and it saves it to the style sheet and its done and ready to go.

 

Is there a script that can do this? Im not very good with starting things from scratch if you get me so I need a bit of help with this please :)

 

Hope you can help

Many thanks

Joe

I think you could do this with php? I have heard that you can enable php to run in a style sheet using a HTACCESS file.

 

What you would need to do is set the colours in the style sheet as variable e.g. box {color:$boxcolour;\}

 

Then have a page that is included that the user can select the colour from and make it set the variable.

 

Correct me If im wrong as im still learning php?

 

:)

You could put the styles that you will allow the client to edit in a separate stylesheet, then use the host's server control panel to set restriction with a username and password that only allows access to that css file (and set a different username and password for all the others so that he/she can't access all the others).

 

I think you can do this with ftp username/password.

 

On reflection that isn't very user-friendly because although there would only be access to a few styles, the client would have to know how to edit them, so a form where the client enters and submits a color, like green, and the PHP converts that to a code and edits the css file is required.

Edited by Wickham

  • Author

Hi

 

Thanks alot for the replies :)

 

ayoungh - I dont have enough knowledge to know how to code it from scratch :( I need a simple example then I can make the rest work.

 

Wickham - This would be to complex as my clients have NO HTML knowledge :)

 

Many thanks for your help though :D

Joe

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.