Maria Gonzalez Posted May 6, 2024 Share Posted May 6, 2024 Hi, on the classic theme, on the category page, the header where the name of the category is written is too height! How can I reduce it? Also I'll to center the category name on the header.. Link to comment Share on other sites More sharing options...
webprog Posted May 7, 2024 Share Posted May 7, 2024 Hello, you can use theme.css file of the theme: themes/classic/assets/css/theme.css .block-category h1 Link to comment Share on other sites More sharing options...
Prestashop Addict Posted May 7, 2024 Share Posted May 7, 2024 Hi, in theme.css change to .block-category h1 { margin-bottom: 1rem; font-size: 1.5rem; text-align: center; } Link to comment Share on other sites More sharing options...
Maria Gonzalez Posted May 7, 2024 Author Share Posted May 7, 2024 11 minutes ago, Prestashop Addict said: Hi, in theme.css change to .block-category h1 { margin-bottom: 1rem; font-size: 1.5rem; text-align: center; } Thanks! That solved the alignment issue, however in that h1 tag I do not see anything referring to height or width of the block... Link to comment Share on other sites More sharing options...
webprog Posted May 7, 2024 Share Posted May 7, 2024 3 minutes ago, Maria Gonzalez said: Thanks! That solved the alignment issue, however in that h1 tag I do not see anything referring to height or width of the block... You can use font-size property for height. Or add height and width properties to the body of the block: .block-category h1 { margin-bottom: 1rem; font-size: 1rem; text-align: center; width:100px; height:10px; } Link to comment Share on other sites More sharing options...
Prestashop Addict Posted May 7, 2024 Share Posted May 7, 2024 il y a 13 minutes, Maria Gonzalez a dit : Thanks! That solved the alignment issue, however in that h1 tag I do not see anything referring to height or width of the block... What do you mean by height and width. If you put fixed value, you'll have display issues on small devices 😞 Link to comment Share on other sites More sharing options...
Maria Gonzalez Posted May 7, 2024 Author Share Posted May 7, 2024 8 minutes ago, webprog said: You can use font-size property for height. Or add height and width properties to the body of the block: .block-category h1 { margin-bottom: 1rem; font-size: 1rem; text-align: center; width:100px; height:10px; } Height seems to not affect the block... Link to comment Share on other sites More sharing options...
Prestashop Addict Posted May 7, 2024 Share Posted May 7, 2024 il y a 3 minutes, Maria Gonzalez a dit : Height seems to not affect the block... Ok try .block-category { min-height: 3.75rem; margin-bottom: 1.563rem; } 1 Link to comment Share on other sites More sharing options...
Maria Gonzalez Posted May 7, 2024 Author Share Posted May 7, 2024 3 minutes ago, Prestashop Addict said: Ok try .block-category { min-height: 3.75rem; margin-bottom: 1.563rem; } That worked ! Thanks! Link to comment Share on other sites More sharing options...
Prestashop Addict Posted May 7, 2024 Share Posted May 7, 2024 You're welcome, don't forget to add [SOLVED] to your subject 😉 Link to comment Share on other sites More sharing options...
JBW Posted May 7, 2024 Share Posted May 7, 2024 Don't change theme.css directly, you will loose all your changes with next upgrade. Rather use custom.css Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now