Jump to content

How to seperate an H4 style text from the rest of the H4's?


Juan Rios1

Recommended Posts

Basicly, I have some text I would like to make bigger in my homepage, but when I change it's font, some other text also change size, all the H4's in the class "title_block" change. Is there a way to change this specific H4 to a different class?

I'm using prestashop 1.7
image.thumb.png.f2d4554daddb329c3fc889ac081ed578.png

Link to comment
Share on other sites

On 3/27/2021 at 4:51 AM, musicmaster said:

Sure, just mention a surrounding element in your css like


div.appagebuilder h4 { font-size: 1000px; }

 

Thank you, can you help me how to do this with a live example? I mean I see you put "div.appagebuilder" but I don't know where you got that from

My link is test.riograndeboots.com.mx

Thanks in advance!

image.thumb.png.de71c832c088455e7d99afc2328a4b8d.png

Link to comment
Share on other sites

1 hour ago, Juan Rios1 said:

Thank you, can you help me how to do this with a live example? I mean I see you put "div.appagebuilder" but I don't know where you got that from

My link is test.riograndeboots.com.mx

Thanks in advance!

 

Sorry, but this is basic CSS. In addition I already explained it.

But I will try once more:

The enclosing div has description:

<div  class="block products_block exclusive appagebuilder text-align:center; apProductCarousel"> 

"block products_block exclusive appagebuilder text-align:center; apProductCarousel" are all class names and you can use any of them for this purpose. I chose "appagebuilder" as that seemed the most specific. But I could have chosen any of them. The only risk is that there will be more than one enclosing div's with the same class name.

I could also have used classes of div's higher in the hierarchy like "ApRow"

BTW: the "text-align:center" shouldn't be among the classes. That is a major error.

jqueer.jpg.05ba03a0c80e0e913ba00d36098b9c5b.jpg

Link to comment
Share on other sites

7 minutes ago, Juan Rios1 said:

I have not managed to change it, I've tried with various classes such as the picture I attached.

Do you see anything wrong?

Yes, this is wrong.

You must think hierarchical. At the left is the top level and towards the right you get lower levels.

So ".title_block .ApProductCarousel h4" translates as: find a "h4" that is enclosed by an element with class "ApProductCarousel". This "ApProductCarousel" element should be enclosed by an element with class "title_block".

Link to comment
Share on other sites

2 hours ago, musicmaster said:

Yes, this is wrong.

You must think hierarchical. At the left is the top level and towards the right you get lower levels.

So ".title_block .ApProductCarousel h4" translates as: find a "h4" that is enclosed by an element with class "ApProductCarousel". This "ApProductCarousel" element should be enclosed by an element with class "title_block".

Ok, I have tried following it hierarchical and still have no sucess. I actually tried a few methods and nothing

image.thumb.png.753406c3c2f134de9c77bbee24e2067d.png

I only know basic css properties, and haven't seen structure that much, sorry if I'm having trouble understanding

Link to comment
Share on other sites

Trying three things at once is waste of time. Only the last one will count.

Refresh the browser cache (ctrl-F5 on pc) after every css change.

".title_block h4" translates as: find a h4 enclosed by an element with class title_block. If you want a h4 with class title_block you should use "h4.title-block".

  • Thanks 1
Link to comment
Share on other sites

11 hours ago, musicmaster said:

Trying three things at once is waste of time. Only the last one will count.

Refresh the browser cache (ctrl-F5 on pc) after every css change.

".title_block h4" translates as: find a h4 enclosed by an element with class title_block. If you want a h4 with class title_block you should use "h4.title-block".

Well after endless tried I somehow got it to work using your class observation, thank you so much for all this help!

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...