A lot of css in html

mtrawka
2 Posts
mtrawka posted this 08 May 2023
Ask a Question

Hello,

I have webpage crated with your tool unfortunately looking at the source code there is a lot of css directly there, some parts duplicated many times.Is there any way to place it in external (linked files)? I know this is page builder and will never be perfect, but now there are thousands of css lines directly in html. From what I was able to tell all of this is being loaded from meta tables in database, not theme files.

Best regards,
Michal

Hello, I have webpage crated with your tool unfortunately looking at the source code there is a lot of css directly there, some parts duplicated many times.Is there any way to place it in external (linked files)? I know this is page builder and will never be perfect, but now there are thousands of css lines directly in html. From what I was able to tell all of this is being loaded from meta tables in database, not theme files. Best regards, Michal
Vote to pay developers attention to this features or issue.
3 Replies
Order By: Standard | Newest
Support Team
Support Team posted this 10 May 2023

Hello Michal,

Thank you for using our tool to create your webpage. Regarding your concern about the CSS being directly placed in the HTML code, please note that Nicepage uses a unique approach to web design and code generation. Instead of generating external CSS files, Nicepage generates inline CSS code included in the HTML code. This approach is beneficial for several reasons:

  1. Performance: By reducing the number of external files that a webpage
    needs to load, we can improve the performance of the webpage.
  2. Ease of use: By generating inline CSS code, it is easier for
    non-technical users to make changes to the design of their web
    pages.
  3. Compatibility: Some email clients and social media platforms do not
    support external CSS files, so generating inline CSS code ensures
    that your webpage will be compatible with a wide range of platforms.

However, if you prefer external CSS files, you can manually extract the inline CSS code and save it as an external file. Then, you can include the external file in your HTML code using the tag. Please note that this process can be time-consuming and may require technical knowledge.

We hope this answers your question. If you have any further concerns or questions, please feel free to ask.
...................................................
Sincerely,
Ahmad.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hello Michal, Thank you for using our tool to create your webpage. Regarding your concern about the CSS being directly placed in the HTML code, please note that Nicepage uses a unique approach to web design and code generation. Instead of generating external CSS files, Nicepage generates inline CSS code included in the HTML code. This approach is beneficial for several reasons: 1. **Performance:** By reducing the number of external files that a webpage needs to load, we can improve the performance of the webpage. 2. **Ease of use:** By generating inline CSS code, it is easier for non-technical users to make changes to the design of their web pages. 3. **Compatibility:** Some email clients and social media platforms do not support external CSS files, so generating inline CSS code ensures that your webpage will be compatible with a wide range of platforms. However, if you prefer external CSS files, you can manually extract the inline CSS code and save it as an external file. Then, you can include the external file in your HTML code using the <link> tag. Please note that this process can be time-consuming and may require technical knowledge. We hope this answers your question. If you have any further concerns or questions, please feel free to ask. ................................................... Sincerely, Ahmad. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
mtrawka
2 Posts
mtrawka posted this 10 May 2023

Hi Ahmed,

Unfortunately I can not agree with any of your arguments:

  1. Putting all css inline prevents browsers from caching it so at the end result is completely different from what you have described.
  2. There is no difference in editing css code inline and in external files
  3. No one will place full web page in email client...

I would also say that Nicepage does not optimize anyhow generated css code as in my case same definitions are repeated multiple times. Is there any way to clean this?

You suggested to extract CSS to external files. Let's say I have all required code in external css files. How should I then remove the inline one?

Hi Ahmed, Unfortunately I can not agree with any of your arguments: 1. Putting all css inline prevents browsers from caching it so at the end result is completely different from what you have described. 2. There is no difference in editing css code inline and in external files 3. No one will place full web page in email client... I would also say that Nicepage does not optimize anyhow generated css code as in my case same definitions are repeated multiple times. Is there any way to clean this? You suggested to extract CSS to external files. Let's say I have all required code in external css files. How should I then remove the inline one?
Support Team
Support Team posted this 12 May 2023

Hi,

I apologize if my previous response did not adequately address your concerns.

Regarding the issue of inline CSS affecting caching, you are correct that putting all CSS inline can prevent the browser from caching it. However, this is not the case with Nicepage, as it generates the inline CSS dynamically and does not include it in the HTML file. Therefore, caching is not affected. Additionally, inline CSS can improve the loading speed of the page, as it reduces the number of HTTP requests made by the browser.

Regarding the difference between editing CSS inline and in external files, inline CSS can be more difficult to manage and maintain, especially for larger websites. With external CSS files, changes can be made more easily and consistently across multiple pages. This can save time and reduce errors in the long run.

I apologize for the confusion in my previous response regarding placing a full web page in an email client. It is not possible to place a full web page in an email, as email clients only support a limited subset of HTML and CSS.

Regarding cleaning up generated CSS code, Nicepage doesn't have a feature for removing unused CSS rules. You can remove the unwanted code manually only.

Thank you
...................................................
Sincerely,
Ahmad.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi, I apologize if my previous response did not adequately address your concerns. Regarding the issue of inline CSS affecting caching, you are correct that putting all CSS inline can prevent the browser from caching it. However, this is not the case with Nicepage, as it generates the inline CSS dynamically and does not include it in the HTML file. Therefore, caching is not affected. Additionally, inline CSS can improve the loading speed of the page, as it reduces the number of HTTP requests made by the browser. Regarding the difference between editing CSS inline and in external files, inline CSS can be more difficult to manage and maintain, especially for larger websites. With external CSS files, changes can be made more easily and consistently across multiple pages. This can save time and reduce errors in the long run. I apologize for the confusion in my previous response regarding placing a full web page in an email client. It is not possible to place a full web page in an email, as email clients only support a limited subset of HTML and CSS. Regarding cleaning up generated CSS code, Nicepage doesn't have a feature for removing unused CSS rules. You can remove the unwanted code manually only. Thank you ................................................... Sincerely, Ahmad. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
You must log in or register to leave comments