0
Welcome Guest! Login
0 items Join Now

SOLVED HTML & CSS question - h1 tag for titles

    • Franck's Avatar
    • Franck
    • Elite Rocketeer
    • Posts: 1049
    • Thanks: 0

    SOLVED HTML & CSS question - h1 tag for titles

    Posted 17 years 3 months ago
    • 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:
      table.sections .contentheading {
           font-size: 145%;
      }
       
      .contentheading {
           font-size: 160%;
      }

      Someone can help me to modify this code?

      thx! :)
    • Last Edit: 17 years 3 months ago by Franck.
    • GollumX's Avatar
    • GollumX
    • Elite Rocketeer
    • Posts: 2817
    • Thanks: 0

    Re: SOLVED HTML & CSS question - h1 tag for titles

    Posted 17 years 3 months ago
    • 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>
    • Say no to Internet Explorer 6.
      twitter.com/mark_up
    • Franck's Avatar
    • Franck
    • Elite Rocketeer
    • Posts: 1049
    • Thanks: 0

    Re: SOLVED HTML & CSS question - h1 tag for titles

    Posted 17 years 3 months ago
    • Hello Golum,

      I found only this code around line 1078:
      <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&#058; 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... :-[
  • Re: SOLVED HTML & CSS question - h1 tag for titles

    Posted 17 years 3 months ago
    • Which Joomla version are you using ?
    • I use simplix, does this mean that I'm a simple guy ? :)
    • Franck's Avatar
    • Franck
    • Elite Rocketeer
    • Posts: 1049
    • Thanks: 0

    Re: SOLVED HTML & CSS question - h1 tag for titles

    Posted 17 years 3 months ago
    • the latest version: 1.0.13
      I was thinking maybe the code has been modified after 1.0.12?
    • Franck's Avatar
    • Franck
    • Elite Rocketeer
    • Posts: 1049
    • Thanks: 0

    Re: SOLVED HTML & CSS question - h1 tag for titles

    Posted 17 years 3 months ago
    • Haaaa! I found other contentheading code at lines 621 and 629.
      Let me do some tests and I will post the result ;)
  • Re: SOLVED HTML & CSS question - h1 tag for titles

    Posted 17 years 3 months ago
    • shouldn't the heading tags be closed? </h1> or am i wrong?
    • GollumX's Avatar
    • GollumX
    • Elite Rocketeer
    • Posts: 2817
    • Thanks: 0

    Re: SOLVED HTML & CSS question - h1 tag for titles

    Posted 17 years 3 months ago
    • 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.
    • Say no to Internet Explorer 6.
      twitter.com/mark_up
  • Re: SOLVED HTML & CSS question - h1 tag for titles

    Posted 17 years 3 months ago
    • not using the pdf's, but first test failed. Spyder keep saying no H1 tags found :( :(
    • Franck's Avatar
    • Franck
    • Elite Rocketeer
    • Posts: 1049
    • Thanks: 0

    Re: SOLVED HTML & CSS question - h1 tag for titles

    Posted 17 years 3 months ago
    • OK, I get it! Thanks Gollum ;)

      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:
      <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:
      <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:
      table.sections .contentheading {
       
           font-size: 145%;
       
      }
       
      .contentheading {
       
           font-size: 160%;
       
      }

      Change to:
      table.sections .contentheading {
       
           font-size: 100%;
       
      }
       
      .contentheading {
       
           font-size: 100%;
       
      }

      Find around line 186:
      div#mainbody .contentheading {
       
           font-size: 200%;
       
      }

      and change to:
      div#mainbody .contentheading {
       
           font-size: 100%;
       
      }

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

      Find around line 541:
      .contentheading {
       
           padding: 10px 0;
       
           line-height:100%;
       
      }

      And change to (make adjustment depending on template but this one just work great with V III):
      .contentheading {
       
           padding: 0px 10;
       
           line-height:10%;
       
      }

      Hope this help ;) and good SEO for everyone ;D

Time to create page: 0.059 seconds