Jump to content

How to Set H1,H2 Size Through Css?


Recommended Posts

Hello Friends,

 

I like to know is there is any through which we can auto set size and font for h1, h2 tag? Suppose while writing product description, we select h1 tag for title then it will automatically take mentioned font & size. Same for other tags.

 

Please let us know if anyone have any idea.

 

Thanks

Vilas

Link to comment
Share on other sites

There's a great plugin for your browser (assuming it's not IE) called firebug. (download it here)

 

once installed, you can inspect each element of your pages. hover over your h2 or h2 and it will tell you exactly which style sheet and which line is defining its size, colour, font, etc... once you know which style sheet to edit, you can edit accordingly.

Link to comment
Share on other sites

I believe there are some assigned properties to H tags, which you can edit at any time, or create others for specific positions.

For example #pb-left-column h1 which will apply to all h1 tags inside div pb-left-column

 

You need to be familiar with css, and put these properties in global.css(for example)

Link to comment
Share on other sites

Hi Snade,

 

I have checked all posible things from my end. But not able to set. I wonder now a days not a single prestashop member replying on any queries. Is it due to they become number one and now not need any users?

 

Thanks

Link to comment
Share on other sites

I'm not really sure what youre talking about. You can get all the support you need in this forum, as long as you ask the right questions, the right way. But it looks like you dont.

 

First, learn some html and css when you want to code such things by yourself. - http://www.w3schools.com/css/css_text.asp

 

Then read my last post again, open your global.css and edit the h4 properties you want, or add others.

Link to comment
Share on other sites

Dear Snade,

 

See I wish to autoset font type and font size for H1 tag, Similarly for other H2, H3 .... Suppose I am writing a product title in description if I select that title as H1 then my after applying H1 automatically it will take selected font and font size. Same for all other tags.

 

Please let us know if still it not clears.

 

Thanks

Link to comment
Share on other sites

Ok, I'll try to help you one more time

I assume that you want to use these h1 tags inside the product description.

 

Since I dont know what theme you use, you have to find out for yourself where the desired h1 properties are. Add some text in the product description and make it h1. Then open that product in front office, select the text, right click ->inspect element(firebug), then on the right box of your firebug, you'll see where is the h1 you want edit, what exactly parameters it has now, and also you can change it right there to preview the result.

 

 

Also, the prestashop text editor gives you the option to select styles.

 

Just open your global.css and add something like this:

 

.myh1tag {

font-size: 24px;

line-height: 22px;

color: #000;

}

 

then in the text editor, select myh1tag from the styles dropdown list.

 

is this what youre asking for ?

Link to comment
Share on other sites

Dear Snade,

 

Sorry for troubling you and thanks for your kind support. I have tried ur solution. I used firebug and found below details for

h1 tag

 

 

element.style {

 

 

font-family:book antiqua,palatino;

font-size:14pt;

}

 

As I have selected above font and size. So I wish to set it to permanant value. Whenever I select h1 tag through editor automatically this font and font size will be applied to it.

 

Thanks

Link to comment
Share on other sites

Hi :) usually the h1 properties are in global.css in section /* global RTE fields */

and the h1 tag is

.rte h1,
.mceContentBody h1 {
font-size: 25px;
font-weight: bold
}

 

It is possible your theme to lack these classes, so the tinymce only add font-size as a style="font-size:14pt" to the text(it doesnt load it from external css file, the size is right there in the html code)

 

My suggestion for you is to go for my second advice, and make your own styles for h1, and call them from the styes dropdown, not the paragraph.

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...