mcpainter02 Posted May 17, 2011 Share Posted May 17, 2011 Hello, I need some simple help styling the output of some simple php code, I have attached a view of what the output is of right now and of what I need it to look like in the end, I have tried several times myself with faulty results. The number 3 in the first screenshot attachment is what I am looking for on the article count code, it has a div style of <div class="cart-count"> the number 5 is the output of the code and that is what I need changed to the cart count class. I need the article count to be centered and to the left of the text output code, example of what I am looking for is in screenshot2 attachment. Can someone please help??? <?php // no direct access defined('_JEXEC') or die('Restricted access'); ?> <div class="articles_count<?php echo $params->get('moduleclass_sfx'); ?>"> <!--- I need this article count to have a different output style then the next php code below, I also need to have it float center and to the left---> <?php foreach($lists->artcount as $key => $value): ?> <!--- End ---> <!--- I need this to float center and right to the above article count code ---> <?php echo trim($params->get('beforeText')); ?> <?php echo $value; ?> <!--- End ---> <?php if ($lists->type == 'section'){ echo trim($params->get('afterTextSection')); } else {echo trim($params->get('afterTextCategory')); } ?> <?php echo $lists->names[$key]; ?> <?php endforeach; ?> [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted May 17, 2011 Share Posted May 17, 2011 Did you consider posting this in the freelance forum? Quote Link to comment Share on other sites More sharing options...
mcpainter02 Posted May 17, 2011 Author Share Posted May 17, 2011 Does that mean I cant get some simple help here at this PHP help forum? I am not looking to pay someone to do freelance work, This is a simple 2 min fix. I just can't figure it out myself. Sorry if I posted to the wrong forum, was just looking for a little help is all. Quote Link to comment Share on other sites More sharing options...
mcpainter02 Posted May 17, 2011 Author Share Posted May 17, 2011 Did you consider posting this in the freelance forum? Hello, I am just looking to get the count number a larger size then the rest of the text, was just wondering if there might be a simple solution? Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted May 17, 2011 Share Posted May 17, 2011 yes there is! http://www.google.nl/#sclient=psy&hl=en&source=hp&q=increase+font+size+css&aq=f&aqi=g1g-b1&aql=&oq=&pbx=1&fp=61eb56f91fd2604f Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted May 17, 2011 Share Posted May 17, 2011 Does that mean I cant get some simple help here at this PHP help forum? I am not looking to pay someone to do freelance work, This is a simple 2 min fix. I just can't figure it out myself. Sorry if I posted to the wrong forum, was just looking for a little help is all. time is irrelevant. If you want others for you to code, and your not showing your efforts in the form of for instance code. this is not the right forum, but the freelance one is. IF on the other hand your showing that effort, (maybe you were close, but just missed a simple thing, or more complex), anything but the freelance forum is the right place. So if you've tried something show it. happy to help, certainly as far as css Quote Link to comment Share on other sites More sharing options...
mcpainter02 Posted May 18, 2011 Author Share Posted May 18, 2011 Sorry, from what I have just learned by doing a little more research is that I need to know how to ad a font size echo within this piece of code, I was asking the wrong question. Please forgive me, I am a newbie!! I would like to ad a font size echo to this code, Can someone please help??? <?php foreach($lists->artcount as $key => $value): ?> Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted May 18, 2011 Share Posted May 18, 2011 the problem with that little snippet is, is that we have no idea what the value is of the variable. besides that it's way better to separate style from code. so what i would do instead of directly outputing it like doing this <?php foreach($lists->artcount as $key => $value){ echo'<p style="font-size:1.2em;>'.$value.'</p>"'; // this is called inline style in css } ?> instead I would put this function inside a container to set it's value from outside by using a stylesheet. <div id="counter"> ..... <?php foreach($lists->artcount as $key => $value){ echo $value; } ?> ..... </div> and than in a stylesheet you just say #counter{ font-size:1.2em; } or you give it a class <?php foreach($lists->artcount as $key => $value){ echo'<p class="counter">'.$value.'</p>"'; // assigning a class to target it from a stylesheet } ?> But again, defining the looks of something is based on the output, so what you could better do and present us is just right click view source copy paste and post the portion you know that is the right one. maybe it allready has an ide or class or anything so it can be targeted from a stylesheet. But as you might have guessed the stuff(html) coming from that php script we can't know 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.