Guest Posted May 22, 2011 Report Share Posted May 22, 2011 Heel i need helpw ith the centring of the news on the home page. Any ideas? Josh Quote Link to comment Share on other sites More sharing options...
Blu-Express VA Posted May 22, 2011 Report Share Posted May 22, 2011 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> 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted May 22, 2011 Report Share Posted May 22, 2011 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. :) Quote Link to comment Share on other sites More sharing options...
Blu-Express VA Posted May 22, 2011 Report Share Posted May 22, 2011 You're Welcome Quote Link to comment Share on other sites More sharing options...
Guest Posted May 22, 2011 Report Share Posted May 22, 2011 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)? Quote Link to comment Share on other sites More sharing options...
stuartpb Posted May 22, 2011 Report Share Posted May 22, 2011 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 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.