Solved

moving divs down about 20px

Posted on 2013-06-05
15
294 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
 

Author Comment

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

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 52

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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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 52

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 52

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 52

Expert Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

912 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now