Author Topic: one for the coding geeks... *new problem* page 2  (Read 2895 times)

Offline Guy

  • Forum addict
  • *
  • Posts: 6,118
one for the coding geeks... *new problem* page 2
« on: 02 February 2012, 19:16 »
relating to this page...

http://tonavaleting.com/

I want the phone number and the social icons in the trh box to appear on the same line (or at least see what they look like on the same line)

this is the section of code that relates to it..

Quote
<div id="add-nav-handler"><h4>Telephone: 07966 274165</h4>
            <?php if($this->params->get('twitter') || $this->params->get('linkedin') || $this->params->get('RSS') || $this->params->get('facebook') || $this->params->get('blogger')  || $this->params->get('myspace') ) : ?>
            <div id="social">
               <ul id="social-links">
               <?php if($this->params->get('twitter')) : ?><li><a href="<?php echo $this->params->get('twitter'); ?>" title="Twitter" id="twitter" target="_blank">Follow Us</a></li><?php endif; ?>
               <?php if($this->params->get('blogger')) : ?><li><a href="<?php echo $this->params->get('blogger'); ?>" title="Blogger" id="blogger" target="_blank">Blogger</a></li><?php endif; ?>
               <?php if($this->params->get('facebook')) : ?><li><a href="<?php echo $this->params->get('facebook'); ?>" title="Facebook" id="facebook" target="_blank">Facebook</a></li><?php endif; ?>
               <?php if($this->params->get('RSS')) : ?><li><a href="<?php echo $this->params->get('RSS'); ?>" title="RSS" id="rss" target="_blank">RSS</a></li><?php endif; ?>
               <?php if($this->params->get('linkedin')) : ?><li><a href="<?php echo $this->params->get('linkedin'); ?>" title="Linkedin" id="linkedin" target="_blank">Linkedin</a></li><?php endif; ?>
               <?php if($this->params->get('myspace')) : ?><li><a href="<?php echo $this->params->get('myspace'); ?>" title="myspace" id="myspace" target="_blank">myspace</a></li><?php endif; ?>
               </ul>
            </div>

any clues please?
« Last Edit: 04 February 2012, 18:23 by Guy »

Offline dom

  • 10k hero
  • *
  • Posts: 10,084
  • Back in a Mk4
Re: one for the coding geeks...
« Reply #1 on: 02 February 2012, 19:27 »
relating to this page...

http://tonavaleting.com/

I want the phone number and the social icons in the trh box to appear on the same line (or at least see what they look like on the same line)

this is the section of code that relates to it..

Quote
<div id="add-nav-handler"><h4>Telephone: 07966 274165</h4>
            <?php if($this->params->get('twitter') || $this->params->get('linkedin') || $this->params->get('RSS') || $this->params->get('facebook') || $this->params->get('blogger')  || $this->params->get('myspace') ) : ?>
            <div id="social">
               <ul id="social-links">
               <?php if($this->params->get('twitter')) : ?><li><a href="<?php echo $this->params->get('twitter'); ?>" title="Twitter" id="twitter" target="_blank">Follow Us</a></li><?php endif; ?>
               <?php if($this->params->get('blogger')) : ?><li><a href="<?php echo $this->params->get('blogger'); ?>" title="Blogger" id="blogger" target="_blank">Blogger</a></li><?php endif; ?>
               <?php if($this->params->get('facebook')) : ?><li><a href="<?php echo $this->params->get('facebook'); ?>" title="Facebook" id="facebook" target="_blank">Facebook</a></li><?php endif; ?>
               <?php if($this->params->get('RSS')) : ?><li><a href="<?php echo $this->params->get('RSS'); ?>" title="RSS" id="rss" target="_blank">RSS</a></li><?php endif; ?>
               <?php if($this->params->get('linkedin')) : ?><li><a href="<?php echo $this->params->get('linkedin'); ?>" title="Linkedin" id="linkedin" target="_blank">Linkedin</a></li><?php endif; ?>
               <?php if($this->params->get('myspace')) : ?><li><a href="<?php echo $this->params->get('myspace'); ?>" title="myspace" id="myspace" target="_blank">myspace</a></li><?php endif; ?>
               </ul>
            </div>

any clues please?

I'd guess it's because they are in separate divs.

If you want them side by side you'll have to float each div and possibly specify the width of each one (as I think the by default a div width is set to 100%

 :wink:

Offline Guy

  • Forum addict
  • *
  • Posts: 6,118
Re: one for the coding geeks...
« Reply #2 on: 02 February 2012, 20:18 »
so it now sits like...

Quote
<div id="add-nav-handler">
            <?php if($this->params->get('twitter') || $this->params->get('linkedin') || $this->params->get('RSS') || $this->params->get('facebook') || $this->params->get('blogger')  || $this->params->get('myspace') ) : ?>
            <div id="social"><h4>Telephone: 07966 274165</h4>
               <ul id="social-links">
               <?php if($this->params->get('twitter')) : ?><li><a href="<?php echo $this->params->get('twitter'); ?>" title="Twitter" id="twitter" target="_blank">Follow Us</a></li><?php endif; ?>
               <?php if($this->params->get('blogger')) : ?><li><a href="<?php echo $this->params->get('blogger'); ?>" title="Blogger" id="blogger" target="_blank">Blogger</a></li><?php endif; ?>
               <?php if($this->params->get('facebook')) : ?><li><a href="<?php echo $this->params->get('facebook'); ?>" title="Facebook" id="facebook" target="_blank">Facebook</a></li><?php endif; ?>
               <?php if($this->params->get('RSS')) : ?><li><a href="<?php echo $this->params->get('RSS'); ?>" title="RSS" id="rss" target="_blank">RSS</a></li><?php endif; ?>
               <?php if($this->params->get('linkedin')) : ?><li><a href="<?php echo $this->params->get('linkedin'); ?>" title="Linkedin" id="linkedin" target="_blank">Linkedin</a></li><?php endif; ?>
               <?php if($this->params->get('myspace')) : ?><li><a href="<?php echo $this->params->get('myspace'); ?>" title="myspace" id="myspace" target="_blank">myspace</a></li><?php endif; ?>
               </ul>
            </div>

what else do i need to do?  :wink:

Offline jamie_pyrite

  • I live here
  • *****
  • Posts: 901
Re: one for the coding geeks...
« Reply #3 on: 03 February 2012, 11:08 »
Looks like you've got it working now? :)
« Last Edit: 03 February 2012, 11:12 by jamie_pyrite »

Offline Guy

  • Forum addict
  • *
  • Posts: 6,118
Re: one for the coding geeks...
« Reply #4 on: 03 February 2012, 11:12 »
Fill in the blanks I guess? A target should be your URL I assume.

they're all cool and working just fine... if I need to add any of those I can do...

its just the placement of the phone number and the social icons that I am having a spot of bother with... if you look at the top right hand corner of http://tonavaleting.com/ I want to see if I can get them to display on one line but I don't know what I need to do to get them to do that..  :undecided:

Offline jamie_pyrite

  • I live here
  • *****
  • Posts: 901
Re: one for the coding geeks...
« Reply #5 on: 03 February 2012, 11:28 »
Fill in the blanks I guess? A target should be your URL I assume.

they're all cool and working just fine... if I need to add any of those I can do...

its just the placement of the phone number and the social icons that I am having a spot of bother with... if you look at the top right hand corner of http://tonavaleting.com/ I want to see if I can get them to display on one line but I don't know what I need to do to get them to do that..  :undecided:

Oh right, sorry. I've had a look and it just seems like you need to specify the size of the add-nav-handler? If you use the right click>Inspect Element feature in Chrome, does that help you at all? Total guesswork might I add!

Offline Guy

  • Forum addict
  • *
  • Posts: 6,118
Re: one for the coding geeks...
« Reply #6 on: 03 February 2012, 11:29 »
Fill in the blanks I guess? A target should be your URL I assume.

they're all cool and working just fine... if I need to add any of those I can do...

its just the placement of the phone number and the social icons that I am having a spot of bother with... if you look at the top right hand corner of http://tonavaleting.com/ I want to see if I can get them to display on one line but I don't know what I need to do to get them to do that..  :undecided:

Oh right, sorry. I've had a look and it just seems like you need to specify the size of the add-nav-handler? If you use the right click>Inspect Element feature in Chrome, does that help you at all? Total guesswork might I add!

that would make sense.. how would I do that... in CSS?

Offline jamie_pyrite

  • I live here
  • *****
  • Posts: 901
Re: one for the coding geeks...
« Reply #7 on: 03 February 2012, 12:14 »
A quick google says, stick something like style="width:100px" in the div id section..

So:

<div id="add-nav-handler" style="width:600px;">

Source: http://www.css-resources.com/Change-Div-Size-Color-and-Location-with-the-W3C-DOM.htm

Offline Guy

  • Forum addict
  • *
  • Posts: 6,118
Re: one for the coding geeks...
« Reply #8 on: 03 February 2012, 12:22 »
hmmm.... well it is currently

Quote
<div id="add-nav-handler" style="width:1200px;">
            <?php if($this->params->get('twitter') || $this->params->get('linkedin') || $this->params->get('RSS') || $this->params->get('facebook') || $this->params->get('blogger')  || $this->params->get('myspace') ) : ?>
            <div id="social"><h4>Telephone: 07966 274165</h4>
               <ul id="social-links">
               <?php if($this->params->get('twitter')) : ?><li><a href="<?php echo $this->params->get('twitter'); ?>" title="Twitter" id="twitter" target="_blank">Follow Us</a></li><?php endif; ?>
               <?php if($this->params->get('blogger')) : ?><li><a href="<?php echo $this->params->get('blogger'); ?>" title="Blogger" id="blogger" target="_blank">Blogger</a></li><?php endif; ?>
               <?php if($this->params->get('facebook')) : ?><li><a href="<?php echo $this->params->get('facebook'); ?>" title="Facebook" id="facebook" target="_blank">Facebook</a></li><?php endif; ?>
               <?php if($this->params->get('RSS')) : ?><li><a href="<?php echo $this->params->get('RSS'); ?>" title="RSS" id="rss" target="_blank">RSS</a></li><?php endif; ?>
               <?php if($this->params->get('linkedin')) : ?><li><a href="<?php echo $this->params->get('linkedin'); ?>" title="Linkedin" id="linkedin" target="_blank">Linkedin</a></li><?php endif; ?>
               <?php if($this->params->get('myspace')) : ?><li><a href="<?php echo $this->params->get('myspace'); ?>" title="myspace" id="myspace" target="_blank">myspace</a></li><?php endif; ?>
               </ul>
            </div>

and its making no difference whatsoever in chrome  :undecided:

Offline jamie_pyrite

  • I live here
  • *****
  • Posts: 901
Re: one for the coding geeks...
« Reply #9 on: 03 February 2012, 12:58 »
hmmm.... well it is currently

Quote
<div id="add-nav-handler" style="width:1200px;">
            <?php if($this->params->get('twitter') || $this->params->get('linkedin') || $this->params->get('RSS') || $this->params->get('facebook') || $this->params->get('blogger')  || $this->params->get('myspace') ) : ?>
            <div id="social"><h4>Telephone: 07966 274165</h4>
               <ul id="social-links">
               <?php if($this->params->get('twitter')) : ?><li><a href="<?php echo $this->params->get('twitter'); ?>" title="Twitter" id="twitter" target="_blank">Follow Us</a></li><?php endif; ?>
               <?php if($this->params->get('blogger')) : ?><li><a href="<?php echo $this->params->get('blogger'); ?>" title="Blogger" id="blogger" target="_blank">Blogger</a></li><?php endif; ?>
               <?php if($this->params->get('facebook')) : ?><li><a href="<?php echo $this->params->get('facebook'); ?>" title="Facebook" id="facebook" target="_blank">Facebook</a></li><?php endif; ?>
               <?php if($this->params->get('RSS')) : ?><li><a href="<?php echo $this->params->get('RSS'); ?>" title="RSS" id="rss" target="_blank">RSS</a></li><?php endif; ?>
               <?php if($this->params->get('linkedin')) : ?><li><a href="<?php echo $this->params->get('linkedin'); ?>" title="Linkedin" id="linkedin" target="_blank">Linkedin</a></li><?php endif; ?>
               <?php if($this->params->get('myspace')) : ?><li><a href="<?php echo $this->params->get('myspace'); ?>" title="myspace" id="myspace" target="_blank">myspace</a></li><?php endif; ?>
               </ul>
            </div>

and its making no difference whatsoever in chrome  :undecided:


Hmmm, can you do a bit of trial and error by adding that style line to different div id's to see if it affects any of them? It could be that it's just being applied to the wrong div?