Good evening,
I've been trying to get into HTML-CSS lately, just to get to know both of them.
Now I wanted to include a quote in my HTML, which is processed hourly from my machine from a database of famous quotes. I have everything for reading quotes via HTML, but I wanted to do something programming-y to style CSS.
My idea:
- Create a class
.dailyquote{}in the CSS file. - Enter a quote in HTML as:
<div class = "dailyquote"> Quote_text#Quote_Author</div> - When printing CSS Quote_text until it reaches #, ignore #, and then for the rest of the contents of the class, create material for the author of the quote, for example,
float:rightor a smaller font size. Minimal work in HTML, everything is done through CSS.
The thing is, I don’t know how to do this in CSS. As a programmer, I believe that I need at least a loop structure and an if () condition.
Is something like this possible or am I accepting CSS as a programming language? Maybe I have to work through HTML?
source
share