Jump to content

need help with centring news [SOLVED]


Guest

Recommended Posts

For center the Title go in:

your core/templates/news_newsitem.tpl change:

<h3><?php echo $subject;?></strong></h3>

With:

<center><h3><?php echo $subject;?></strong></h3></center>

For center the text and title and Post date go in your core/templates/news_newsitem.tpl change:

<h3><?php echo $subject;?></strong></h3>
<p>Posted by <?php echo $postedby;?> on <?php echo $postdate;?></p>
<p><?php echo html_entity_decode($body);?></p>
<hr>

With:

<center><h3><?php echo $subject;?></strong></h3></center>
<center><p>Posted by <?php echo $postedby;?> on <?php echo $postdate;?></p></center>
</center><p><?php echo html_entity_decode($body);?></p></center>
<hr>

for center text and title change with:

<center><h3><?php echo $subject;?></strong></h3></center>
<p>Posted by <?php echo $postedby;?> on <?php echo $postdate;?></p>
</center><p><?php echo html_entity_decode($body);?></p></center>
<hr>

  • Like 1
Link to comment
Share on other sites

For center the Title go in:

your core/templates/news_newsitem.tpl change:

<h3><?php echo $subject;?></strong></h3>

With:

<center><h3><?php echo $subject;?></strong></h3></center>

For center the text and title and Post date go in your core/templates/news_newsitem.tpl change:

<h3><?php echo $subject;?></strong></h3>
<p>Posted by <?php echo $postedby;?> on <?php echo $postdate;?></p>
<p><?php echo html_entity_decode($body);?></p>
<hr>

With:

<center><h3><?php echo $subject;?></strong></h3></center>
<center><p>Posted by <?php echo $postedby;?> on <?php echo $postdate;?></p></center>
</center><p><?php echo html_entity_decode($body);?></p></center>
<hr>

for center text and title change with:

<center><h3><?php echo $subject;?></strong></h3></center>
<p>Posted by <?php echo $postedby;?> on <?php echo $postdate;?></p>
</center><p><?php echo html_entity_decode($body);?></p></center>
<hr>

Thank you Blu-Express VA it work perfectly thanks for your help. :) :)

Link to comment
Share on other sites

Hi Sorry about this but do you no how to get the welcome text centred (Marked with arrow)?

and also how to get rid of the small square boxes (marked with arrow)?

post-2132-020372000 1306076816_thumb.jpg

Link to comment
Share on other sites

You should try not to use inline styling as Blu Express showed. The best way to code a website is to keep the styling and markup seperated by using the CSS stylesheet to define the styling and applying classes and id's in the html.

As an example, in your html you could set a class for the <h3> element:

<h3 class="centredhead"><?php echo $subject;?></h3>

And then in the skin's CSS file, you would create the following rule:

h3.centredhead {
text-align:center;
}

That way you can seperate the styling from the HTML, which makes life much easier. Also, you can reuse the class you set (.h3.centredhead) and apply other styling options, such as font size, color etc. Another bonus is that you can change the styling of each occurrence of the h3 easily and in one go. If you use inline styling, you would have to manually change every occurrence in the HTML.

EDIT: Here are some tutorials on CSS styling:

http://www.w3.org/MarkUp/Guide/Style

http://www.w3schools.com/css/

http://www.hitmill.com/dhtml/css_intro.html

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...