Page 1 of 1

Theme "Alternative" : insert a h1 in the menu title without changing the style

Posted: Wed Apr 15, 2020 11:20 pm
by thomasrtr
Hi everyone ! I'm working on a website with Bludit. I'm using the theme called Alternative and I want to put a h1 title in the site title, in the menu. In the attachement, you can see where I want to put it.

I know how to do it : I insert some <h1></h1> in the navbar (cf. "In the navbar file" attachment)

But when I do that, my title is becoming too big ! (cf. "What it does in the menu")

I know it has something to do with the CSS. So I made some changes but it doesn't change anything.

So my question is : what do I have to change in the CSS, what do I have to do in order to insert a h1 title without changin the style.

Thanks in advance ! :D

Re: Theme "Alternative" : insert a h1 in the menu title without changing the style

Posted: Fri Apr 17, 2020 2:39 pm
by Edi
thomasrtr wrote: Wed Apr 15, 2020 11:20 pm So my question is : what do I have to change in the CSS, what do I have to do in order to insert a h1 title without changin the style.
What do you mean with "without changing the style"? Which style should it have?

Can you please give the address of the installation?

Re: Theme "Alternative" : insert a h1 in the menu title without changing the style

Posted: Tue Apr 21, 2020 1:32 am
by thomasrtr
I didn't install it yet. I worked on it locally, with Xampp.

I want my title to have a 20px size, the default size, even when I put a h1. But when I transform it into a h1 title, it becomes bigger. I don't want it to be bigger, actually. I just want it to stay with a 20px size.

I don't know if I'm clearer :/

Re: Theme "Alternative" : insert a h1 in the menu title without changing the style

Posted: Fri Apr 24, 2020 12:27 am
by thomasrtr
@Edi : if you still want to see, you can check this website : http://montre-connectee-sportive.fr/.

Re: Theme "Alternative" : insert a h1 in the menu title without changing the style

Posted: Fri Apr 24, 2020 4:27 pm
by dontodd
The size of h1 is determined by the stylesheet. If you're using Firefox, right-click near it and choose Inspect Element. You can do something similar in Chrome using Developer Tools.

You'll see something like the attached, and you can click on the page source on the left to expand the different areas. When you click on the h1 in the header, you can then see all the styles associated with it in the stylesheet. I would go ahead and tweak those to your liking, with the caveat that it may have an unintended result elsewhere on your site. Note that it even tells you the line number to find it in the stylesheet. You probably don't have to worry about it too much with h1 because it won't be used in many places.
Screen Shot 2020-04-24 at 10.19.24 AM.png
Screen Shot 2020-04-24 at 10.19.24 AM.png (235.92 KiB) Viewed 2984 times

Re: Theme "Alternative" : insert a h1 in the menu title without changing the style

Posted: Fri Apr 24, 2020 5:57 pm
by thomasrtr
Hi ! Thanks a lot for your reply. In fact, I already did it. I found the file. In my case, I want to change the h1 font size in the bootstrap.min.css, in the kernel file or something. But everytime I change the size (1.25rem in my case, or 20px), it does absolutely nothing !

When I change the slogan from h1 to h2 in the html, it works. But not when I change the site title from I don't know what to h1 in the bootstrap css sheet. :|

Re: Theme "Alternative" : insert a h1 in the menu title without changing the style

Posted: Fri Apr 24, 2020 6:18 pm
by dontodd
thomasrtr wrote: Fri Apr 24, 2020 5:57 pm Hi ! Thanks a lot for your reply. In fact, I already did it. I found the file. In my case, I want to change the h1 font size in the bootstrap.min.css, in the kernel file or something. But everytime I change the size (1.25rem in my case, or 20px), it does absolutely nothing !

When I change the slogan from h1 to h2 in the html, it works. But not when I change the site title from I don't know what to h1 in the bootstrap css sheet. :|
You'll want to change it in bootstrap.min.css, which should be in the css folder, inside the bl-themes/THEME_NAME folder. Be sure to save it and refresh the page. When you refresh the page, do the "inspect element" again so you can see what styles are being applied. If font-size for h1 is anything other than 20px, change it there as well.

If you have caching enabled for your site, you might have to change that as well.

Re: Theme "Alternative" : insert a h1 in the menu title without changing the style

Posted: Fri Apr 24, 2020 7:00 pm
by thomasrtr
Ok, I just cleaned the cache and it works just fine. I was workin on Xampp. What was I thinking :roll:
Thanks a lot !