Solved

moving divs down about 20px

Posted on 2013-06-05
15
296 Views
Last Modified: 2013-06-05
hi guys,

I want to move down the footer.php about 20 px on my site piratescove.yourcitybeats.com as everything looks abit squashed at the moment?

How can i do that?
0
Comment
Question by:jonathanduane2010
  • 6
  • 5
  • 4
15 Comments
 

Author Comment

by:jonathanduane2010
ID: 39222281
here is css code if this helps

#foo_widget-2 { background: url("images/latest_news_bg.png") repeat scroll 0 0 transparent;
    border: 1px solid #444444;}
#text-3 { background: url("images/latest_news_bg.png") repeat scroll 0 0 transparent;
    border: 1px solid #444444;}
	height: 280px
#foo_widget-2 h2 { color: #8B210A;
    float: left;
   font-family: 'fjalla_oneregular';
    font-size: 16px;
    font-weight: 100;
    margin: 2px 5px;
    padding: 0;
    text-transform: uppercase;
    width: 99%;
}
#foo_widget-2 h2 a { color: #8B210A; text-decoration:none; font-family: 'fjalla_oneregular'; letter-spacing:0px; }
#foo_widget-2 h2 span { color: #389C1D;
    float: right;
    font-family: 'fjalla_oneregular';
    font-size: 14px;
    font-weight: 100;
    margin: 2px 5px;
    padding: 0;
    text-transform: uppercase; }
	#foo_widget-2 p { color: #444444;
    float: left;
    font-family: Arial,Helvetica,sans-serif;
    font-size: 13px;
    margin: 2px 5px;
    padding: 0;
	line-height:18px;
	}
.photos_videos {
    background: url("images/latest_news_bg.png") repeat scroll 0 0 transparent;
    border: 1px solid #444444;
    float: left;
    height: 280px;
    margin: 0;
    padding: 0;
    width: 344px;
	overflow:hidden;
	}	
.photos_videos h2 {
    color: #0A4A8B;
    font-family: 'fjalla_oneregular';
    font-size: 30px;
    margin: 3px 0px 7px 5px;
    padding: 0;
    text-transform: uppercase;
}	
.photos_videos img { width:326px; height:154px; margin-left:9px; }	

Open in new window

0
 
LVL 7

Expert Comment

by:Alex_W
ID: 39222291
You can add a padding style to it, e.g.

<DIV style="padding-top: 20px;"> </DIV>
0
 
LVL 7

Expert Comment

by:Alex_W
ID: 39222296
If your DIV has a class you can do it in your CSS:

.DIVClass
{
padding-top: 20px;
}

Or by the DIV's ID:

#DIVID
{
padding-top: 20px;
}
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:jonathanduane2010
ID: 39222364
ok i have tried adding the padding to it but no luck :(
0
 
LVL 54

Expert Comment

by:Julian Hansen
ID: 39222385
You have 28 errors on this page including a stray </div> tag - fix that first and you will probably find the margin-top setting for your footer will start working.
0
 
LVL 54

Expert Comment

by:Julian Hansen
ID: 39222390
You already have a margin-top set for the footer - but it is not pushing the main site up - probably because of the errors mentioned above. Run your page through and html Validator and fix the errors first
0
 
LVL 7

Expert Comment

by:Alex_W
ID: 39222397
Can you post your HTML for the DIV you want to move?
0
 

Author Comment

by:jonathanduane2010
ID: 39222411
</div>
      <div class="photos_videos">   
       <h2>PHOTOS &amp; VIDEOS</h2>
      <div id="banner-fade">
        <!-- start Basic Jquery Slider -->
        <ul class="bjqs">
       <?php  query_posts("cat=4"); 
         while (have_posts()) : the_post(); ?>
         <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
        <li><a href="<?php the_permalink(); ?>"><img src="<?php echo $image[0]; ?>" title="<?php the_title(); ?>"></a> </li>
         <?php endwhile;
	    wp_reset_query(); ?>
      
        </ul>
        <!-- end Basic jQuery Slider -->
      </div>  
     </div> <!-- #photos_videos -->  
    <div class="widget widget_foo_widget new1" id="foo_widget-2" >
    <h3>Latest News</h3>
   <?php query_posts("cat=3&showposts=3"); 
         while (have_posts()) : the_post();
		echo '<h2><a href="'.get_permalink().'">'.get_the_title().'</a><span>'.get_the_date('d-M-Y').'</span></h2>';
		echo '<p>'.substr(get_the_excerpt(),0,100).'...</p>';
		endwhile;
		wp_reset_query(); ?>
    </div>
   </div><!-- #content -->

Open in new window

0
 
LVL 7

Expert Comment

by:Alex_W
ID: 39222454
Which DIV did you want to move down?  It it was foo_widget-2 then add the padding style to the setting for this in your CSS (on line 1 in your pasted CSS code).  Have you tried inspecting the DIV from the dev tools in a browser, like fire bug in fire fox?  You can insepct the CSS being applied and alter it at runtime to see the changes that take effect.
0
 

Author Comment

by:jonathanduane2010
ID: 39222467
its the two boxes labelled "photos & videos" and "latest news"
0
 
LVL 54

Expert Comment

by:Julian Hansen
ID: 39222518
Wrap those two divs in a container and give the container a margin-top of 20px;

.photo_news_container {
 margin-top: 20px;
}
<div class="photo_news_container">
<div class="photos_videos">   
       <h2>PHOTOS &amp; VIDEOS</h2>
      <div id="banner-fade">
        <!-- start Basic Jquery Slider -->
        <ul class="bjqs">
       <?php  query_posts("cat=4"); 
         while (have_posts()) : the_post(); ?>
         <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
        <li><a href="<?php the_permalink(); ?>"><img src="<?php echo $image[0]; ?>" title="<?php the_title(); ?>"></a> </li>
         <?php endwhile;
	    wp_reset_query(); ?>
      
        </ul>
        <!-- end Basic jQuery Slider -->
      </div>  
     </div> <!-- #photos_videos -->  
    <div class="widget widget_foo_widget new1" id="foo_widget-2" >
    <h3>Latest News</h3>
   <?php query_posts("cat=3&showposts=3"); 
         while (have_posts()) : the_post();
		echo '<h2><a href="'.get_permalink().'">'.get_the_title().'</a><span>'.get_the_date('d-M-Y').'</span></h2>';
		echo '<p>'.substr(get_the_excerpt(),0,100).'...</p>';
		endwhile;
		wp_reset_query(); ?>
    </div>
</div>
   </div><!-- #content -->

Open in new window

0
 

Author Comment

by:jonathanduane2010
ID: 39222547
ok, i am an absolute idiot....

but i have tried that and the siite has gone all over the place

i have added the css above to my style.css

then i replaced my html with the html you posted?
0
 
LVL 54

Accepted Solution

by:
Julian Hansen earned 465 total points
ID: 39222622
Ok don't do that - you posted incomplete code - I was giving you an idea of what you need to do not he actual solution.

Also, as per my earlier post you have an orphan </div> tag in your document which is going to cause problems.

Another option is to do this - add a margin bottom to this line.

<div class="box_row1" style="margin-bottom: 20px;">

Or add this to the box_row class on line 1796 of your style sheet
.box_row1 {
  float: left;
  height: auto;
  min-height: 522px;
  margin-bottom: 20px;
}

Open in new window

0
 

Author Comment

by:jonathanduane2010
ID: 39222649
thank you so much!

( i changed it to 30px) just to be sure  :)
0
 
LVL 54

Expert Comment

by:Julian Hansen
ID: 39222686
You are welcome - thanks for the points.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question