-
AuthorPosts
-
December 1, 2020 at 6:34 pm #1264301
Hi guys,
In a the text tab of a text block, I use to have the following code:
<h1 style="font-size: 50px; text-align: left; color: #a81010; text-shadow: 1px 1px 2px white;">This is my H1 text</h1>
It works fine.Using now a unique custom ID attribute to manage my H1’s, I’ve tried to rewrite that code in the css area but wasn’t able to make it work.
The ID attribute is “rv-h1-portfolio” and here is the last try I’ve written, with no effect at all:#rv-h1-portfolio .h1 { font-size: 50px; text-align: left; color: #a81010; text-shadow: 1px 1px 2px white; }
Anyone can correct and help me getting the right code please ?
December 1, 2020 at 9:25 pm #1264317Hello,
please try with
h1#rv-h1-portfolio
instead of#rv-h1-portfolio .h1
December 1, 2020 at 9:47 pm #1264322Thx Cherrmann,
Unfortunately, it doesn’t work.December 1, 2020 at 10:09 pm #1264326Question
Am I supposed to use the ‘Custom ID Attribute’ field or the‘Custom css class’ one?
I’m getting confused…December 1, 2020 at 10:10 pm #1264327sorry, please try
#rv-h1-portfolio h1
without the dot.if you use a class you would use the dot before the class name in the CSS and you could then reuse the class name somewhere else. If you use an ID you would only use it once and address it with #ID-name
December 1, 2020 at 10:19 pm #1264329Nope that one (#rv-h1-portfolio h1) doesn’t work neither, I had tried it already.
Thx for trying ;)December 3, 2020 at 4:23 am #1264613Hi rvga,
Could you post a link to where we can see the problem you are having?
An ID should be unique for a single page, but a class can be used many times.
Best regards,
RikardDecember 3, 2020 at 8:43 am #1264693Rikard, you can check on that page: https://c-serp.fr/clients-references/service-seo-strategie-de-contenus-blog-vacance-enfant/
I declared in the Custom css Class of the first text block: “rv-h1-portfolio”
And in the quick css, I wrote:#rv-h1-portfolio h1 { font-size:50px; text-align:left; color:#a81010; text-shadow:1px 1px 2px white; }
Obviously that doesn’t work.
An ID should be unique for a single page, but a class can be used many times.
Ok, so I undesrtand that these 2 fields do the same job, except that the Custom ID is unique to a page, portfolio or a post and that the Custom css class can be shared among many pages, portfolios or posts, am I right?
December 3, 2020 at 11:24 am #1264719Hi again,
the heading “Service SEO : stratégie de contenus” is not formatted as H1 but as paragraph
Either you change it to H1 in the text editor (recommended) or you use
.rv-h1-portfolio p { font-size: ... }
December 3, 2020 at 11:30 am #1264720ooh right I see…
So let’s say I change it into an ‘h1’ (instead of p) then the quick ccs code would be:.rv-h1-portfolio h1 { font-size: ... }
- This reply was modified 3 years, 11 months ago by rvga.
December 3, 2020 at 11:39 am #1264724It works fine now and I understood the way it works thanks to both of you
Geee… I’m getting smarter and smarter at css stuff ;)- This reply was modified 3 years, 11 months ago by rvga.
December 3, 2020 at 11:56 am #1264733One more last question please….
Everything works fine except the text-size which remains at 40px when I asked for 50px in the quik css.
Any clue?December 3, 2020 at 12:16 pm #1264737Ok I found, I have had declared another css property for H1’s in the advanced style options… it was kinda conflicting.
It’s all good for me.
Many thanks for the help guys.December 3, 2020 at 8:30 pm #1264859Hi rvga,
Glad you got it working for you! :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- The topic ‘rewriting css properties’ is closed to new replies.