I know this is nowhere related to coding question but before I start working on the scenario I would like to get some guidance.
The scenario is to give the option to change the theme of the page. What I have decided is, give common class for multiple elements like
So I will create multiple stylesheet with these class names with different color.
But the difficulty comes with the positioning of the each elements. I tought of giving inline style to each element to define the position related stuffs. For example
.image {border:grey solid 1px /*this border color will be different in each stylesheet*/}
<div class="image" style="float:right; margin:6px"><img src="" /> </div>
So like this all other elements will be having inline css for the aligning purpose.
Do you think this is the best way to achieve the theme scenario??
PS - User has access to customize the theme. (We are giving edit panel). This is not actually web page, it is a product module (Just like how we change the color of the Powepont graphs and charts).
Suppose that if we want our website to appear in green color along with changing the browser theme color which will be the same as our website, then we can use a meta tag with name and content attribute. Meta Tag: The <meta> tag is used in the <head> element of HTML Document.
Depending on the features that come with your theme, you may be afraid that changing it would cause you to lose content or even delete everything on your site. Luckily, that's not the case. You won't lose all your site content if you switch themes. Still, you might lose more than you think.
A theme is the foundation for the complete design of a website. This includes things like typography, color palettes, headers and footers, backgrounds, and page layouts.
Not really... I think you should load a default "blank' theme for the basic styles and general styles. Than load another stylesheet depending on what theme the user has chosen. In that theme you specify the theme-specific styles (like the border-color from your example).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With