Find out more about the “Show Off Your Avatar Campaign
RocketTheme  |  General  |  The Water Cooler  |  Topic: HTML & CSS question - h1 tag for titles [SOLVED] « previous next »
Pages: [1] 2 Go Down Print
Author Topic: HTML & CSS question - h1 tag for titles [SOLVED]  (Read 15594 times)
Franck
Hero Rocketteer
*****
Online Online

Posts: 877


HTML & CSS question - h1 tag for titles [SOLVED]
« on: August 26, 2007, 07:25:20 PM »

Hello,

I would like to change the contentheading parameter to automatically have the titles between <h1> tag.

In the template.css there is this code:
Code:
table.sections .contentheading {
font-size: 145%;
}

.contentheading {
font-size: 160%;
}

Someone can help me to modify this code?

thx!  Smiley
« Last Edit: August 28, 2007, 02:55:31 AM by Franck » Logged
GollumX
Professional
Hero Rocketteer
*
Offline Offline

Posts: 2691


Got Coffee?

WWW
Re: CSS question
« Reply #1 on: August 26, 2007, 09:09:22 PM »

Look around line 605 to 612 of /components/com_content/content.html.php
change...
<td class="contentheading" [some php code]>
       <a href=[a link here]> </a>
</td>
to...
<td class="contentheading" [some php code]>
       <h1><a href=[a link here]> </a><h1>
</td>

Logged

ninjaforge.com - Joomla Open Source Extension Club
Franck
Hero Rocketteer
*****
Online Online

Posts: 877


Re: CSS question
« Reply #2 on: August 27, 2007, 01:43:45 PM »

Hello Golum,

I found only this code around line 1078:
Code:
<td class="contentheading" >
<?php echo $section;?> / <?php echo $row->id _E_EDIT _E_ADD;?>&nbsp;
<?php echo _E_CONTENT;?> &nbsp;&nbsp;&nbsp;
<a href="javascript: void(0);" onMouseOver="return overlib('<table><?php echo $docinfo?></table>', CAPTION, '<?php echo _E_ITEM_INFO;?>', BELOW, RIGHT);" onMouseOut="return nd();">
<strong>[Info]</strong>
</a>
</td>

I tried to put the <h1>before and after several tags without success...  Embarrassed
Logged
Robby Timmermans
Sr. Rocketeer
****
Offline Offline

Posts: 185


wannabe Mona Lisa smile

WWW
Re: CSS question
« Reply #3 on: August 27, 2007, 01:50:44 PM »

Which Joomla version are you using ?
Logged

I use simplix, does this mean that I'm a simple guy ? Smiley
Franck
Hero Rocketteer
*****
Online Online

Posts: 877


Re: CSS question
« Reply #4 on: August 27, 2007, 01:53:34 PM »

the latest version: 1.0.13
I was thinking maybe the code has been modified after 1.0.12?
Logged
Franck
Hero Rocketteer
*****
Online Online

Posts: 877


Re: CSS question
« Reply #5 on: August 27, 2007, 01:59:17 PM »

Haaaa! I found other contentheading code at lines 621 and 629.
Let me do some tests and I will post the result  Wink
Logged
katrien brebels
Jr. Rocketeer
**
Offline Offline

Posts: 20

Re: CSS question
« Reply #6 on: August 27, 2007, 02:27:58 PM »

shouldn't the heading tags be closed? </h1> or am i wrong?
Logged
GollumX
Professional
Hero Rocketteer
*
Offline Offline

Posts: 2691


Got Coffee?

WWW
Re: CSS question
« Reply #7 on: August 27, 2007, 02:30:11 PM »

the first set should be for the page, the second set of td tags should be for the pdf's.

let us know how it works out.
Logged

ninjaforge.com - Joomla Open Source Extension Club
katrien brebels
Jr. Rocketeer
**
Offline Offline

Posts: 20

Re: CSS question
« Reply #8 on: August 27, 2007, 02:31:59 PM »

not using the pdf's, but first test failed. Spyder keep saying no H1 tags found  Sad Sad
Logged
Franck
Hero Rocketteer
*****
Online Online

Posts: 877


Re: CSS question
« Reply #9 on: August 27, 2007, 02:32:35 PM »

OK, I get it! Thanks Gollum  Wink

The codes I changed if someone is interested. The template I'm using for test is versatility III but with all other templates I think it's the same.

In the /components/com_content/content.html.php:

Find around line 629:
Code:
<td class="contentheading<?php echo $params->get'pageclass_sfx' ); ?>" width="100%">
<?php echo $row->title;?>
<?php HTML_content::EditIcon$row$params$access ); ?>
</td>

Change to:
Code:
<td class="contentheading<?php echo $params->get'pageclass_sfx' ); ?>" width="100%">
<h1><?php echo $row->title;?></h1>
<?php HTML_content::EditIcon$row$params$access ); ?>
</td>

Now it's needed to do some changes in the template_css.css because the ENORMOUS font of all the titles:

Find around line 77:
Code:
table.sections .contentheading {

font-size: 145%;

}

.contentheading {

font-size: 160%;

}

Change to:
Code:
table.sections .contentheading {

font-size: 100%;

}

.contentheading {

font-size: 100%;

}

Find around line 186:
Code:
div#mainbody .contentheading {

font-size: 200%;

}

and change to:
Code:
div#mainbody .contentheading {

font-size: 100%;

}

Finally, make adjustments to this code to match better with the template:

Find around line 541:
Code:
.contentheading {

padding: 10px 0;

line-height:100%;

}

And change to (make adjustment depending on template but this one just work great with V III):
Code:
.contentheading {

padding: 0px 10;

line-height:10%;

}

Hope this help  Wink and good SEO for everyone  Grin
Logged
katrien brebels
Jr. Rocketeer
**
Offline Offline

Posts: 20

Re: CSS question - h1 tag for titles [SOLVED]
« Reply #10 on: August 27, 2007, 02:48:35 PM »

GREAT job guys! THX a lot . SEO score running up with 20 points!!

Just needed to switch to 50% at line 186 with VIII otherwise font was still to large.

Great job  THX Again!
Logged
katrien brebels
Jr. Rocketeer
**
Offline Offline

Posts: 20

Re: CSS question - h1 tag for titles [SOLVED]
« Reply #11 on: August 27, 2007, 04:23:20 PM »

Hi me again, with some issues.
the heading tags work fine though i get problems with docman. tried mjaztools but had no effect.
http://www.pcleek.com

I just recovered everything to default setting without heading tags, while solution is found. Site is published in a popular computer magazine and i cant afford letting it messed up for a couple of hours.
« Last Edit: August 27, 2007, 04:34:59 PM by katrien brebels » Logged
Franck
Hero Rocketteer
*****
Online Online

Posts: 877


Re: CSS question - h1 tag for titles [SOLVED]
« Reply #12 on: August 27, 2007, 04:35:08 PM »

In your template_css.css try to remove this code around line 532:

Code:
.contentheading {

line-height:10%;

}
Logged
katrien brebels
Jr. Rocketeer
**
Offline Offline

Posts: 20

Re: CSS question - h1 tag for titles [SOLVED]
« Reply #13 on: August 27, 2007, 04:55:31 PM »

It helped a bit, but the difference between font size in docman and content is huge. If i bring the titles to normal size, the font in docman is verry small, hardly readable.
Logged
katrien brebels
Jr. Rocketeer
**
Offline Offline

Posts: 20

Re: CSS question - h1 tag for titles [SOLVED]
« Reply #14 on: August 27, 2007, 05:02:07 PM »

changed at around line 50 (template css.css) the H1 size from 200 % to 120 % and it will do the job. Only i have large spaces between title - text - read more button.
body.f-larger {
   font-size: 15px;
}

h1 {
   font-size: 120%;
}

docman holding fine so far.
THX for helping, if u know how to reduce spaces, let me know.
Logged
Pages: [1] 2 Go Up Print 
RocketTheme  |  General  |  The Water Cooler  |  Topic: HTML & CSS question - h1 tag for titles [SOLVED] « previous next »
Jump to: