Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

CSS problem
 
andrewg
Member
 
Avatar
Total Posts:  34
Joined:  2008-07-23
New York
 

Hello,

Im trying to apply some CSS values to a category head (see this thread http://www.magentocommerce.com/boards/viewthread/9654/P15/ ).

Im having trouble getting it to be controlled by CSS to make it an H1.

-Andrew

 
Magento Community Magento Community
Magento Community
Magento Community
 
andrewg
Member
 
Avatar
Total Posts:  34
Joined:  2008-07-23
New York
 

can anyone help me with this? Im almost done and the deadline is here and i cant figure this out.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Smallblock
Jr. Member
 
Total Posts:  24
Joined:  2008-06-25
 

I don’t think that’s an h1 tag by default, so unless you’ve changed it, that may be the problem.

Do you have a link to the site by chance?

I hope it helps,

Zach

 
Magento Community Magento Community
Magento Community
Magento Community
 
andrewg
Member
 
Avatar
Total Posts:  34
Joined:  2008-07-23
New York
 

i need to add the ability to make it an H1 or anything through CSS.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Smallblock
Jr. Member
 
Total Posts:  24
Joined:  2008-06-25
 

CSS can control how an element looks, and it some cases, how it behaves, but it won’t change what type of element it is. For example you can’t make a heading element into a paragraph or vice versa with CSS.

If you want an element to take on a certain appearance (larger text, a different color, etc) you’ll need to find how that element is marked up so you can specify it in your CSS.

The easiest way to do this is just to look at the source of the page you’re working on. Depending on what browser you’re using there should be an option for View -> Page Source or something similar. From there find the element you’re working on and see what markup is wrapped around it, use that to specify your rules to that element and you can make changes to the appears in your CSS file.

If you instead want to change the element to an h1, you’ll need to do that in the template files that generate the page. The easiest way to find out which file generates that bit of the page would be to turn on the ‘Template Path Hints’ option in the admin panel. You can find that by logging in to the admin panel then System -> Configuration, once there select your website from the dropdown menu in the upper left (you’ll probably Main Website) and then click the Developer option on the menu on the left side of the screen. In there you’ll see a section labeled ‘Debug’ including an option for ‘Template Path Hints’, switch that to Yes and save.

When you go back to your site you’ll see paths showing which file generated each piece of the page, find the one generating your heading and track down that file. From there you can make the changes to the actual structure of the page, you may still need to tweak the appearance with CSS to get exactly what you want.

Really it’s up to you which way to go, good luck with it and let me know if I can help.

Zach

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top