Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:24 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : WEBMITE HTML

Author Message
TrevorW
Newbie

Joined: 20/08/2019
Location: New Zealand
Posts: 6
Posted: 11:10pm 09 Dec 2023
Copy link to clipboard 
Print this post

response.zip
When I try to send the attached html file to my browser client, using the WEB TRANSMIT PAGE command, I get errors due to the style css content. I know the syntax is basically sound as I can open the file directly with my (Firefox) browser and the style description is correctly applied.
In particular the "padding: 3px" code line throws up an error "Padding: Different type already declared". If I remove the padding reference I yhen get an error from the button styling - "incorrect operator". Is the MMBASIC getting confused with the curly brackets used in the css content and those reserved for variables that are replaced by their r values?

Any assistance would be appreciated
Edited 2023-12-10 09:24 by TrevorW
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 01:17am 10 Dec 2023
Copy link to clipboard 
Print this post

  TrevorW said  Is the MMBASIC getting confused with the curly brackets used in the css content and those reserved for variables that are replaced by their r values?


Yes, you need to use two opening curly brackets which will be converted to a single bracket for the browser.  You don't need to worry about the closing bracket.

For example:
.Device1{{
   padding:3px;
   color:black;
   background-color:{{BG1$};
   border:black 2px solid;
       }

Geoff
Geoff Graham - http://geoffg.net
 
TrevorW
Newbie

Joined: 20/08/2019
Location: New Zealand
Posts: 6
Posted: 03:03am 10 Dec 2023
Copy link to clipboard 
Print this post

  Geoffg said  
  TrevorW said  Is the MMBASIC getting confused with the curly brackets used in the css content and those reserved for variables that are replaced by their r values?


Yes, you need to use two opening curly brackets which will be converted to a single bracket for the browser.  You don't need to worry about the closing bracket.

For example:
.Device1{{
   padding:3px;
   color:black;
   background-color:{{BG1$};
   border:black 2px solid;
       }

Geoff

Thanks for the advice Geoff
Trevor W
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024