Home › Forums › JavaScript › Make my minum height smaller and no scroll bar
- This topic is empty.
-
AuthorPosts
-
December 5, 2014 at 2:05 pm #190038geediParticipant
OOH ok dit maakt het nog makelijker voor mij nu. Maar nu is er een nieuwe probleem op gedoken man. Als het te klein is de beeld dan krijg je witte stukjes onder de slider is het te groot dan kijg je de slider onder de footer. Wat moet ik doen man.
December 5, 2014 at 4:24 pm #190040ShikkedielParticipantIt’s probably common courtesy to the other members to stick to English though. ;-) Will have another look to see what you mean.
December 5, 2014 at 5:13 pm #190042ShikkedielParticipantOkay, for the slider disappearing underneath the footer you could add a line to the same script :
jQuery(document).ready(function(){ var window_height = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); var body_height = jQuery(document.body).height(); var content = jQuery("#ttr_content_and_sidebar_container"); content.css("min-height", "457px"); if(body_height < window_height){ differ = (window_height - body_height); content_height = content.height() + differ - 42; content.css("height", content_height+"px"); } });
I’ve determined those 457 pix by trying, if you’re gonna add content underneath the slider you’ll have to readjust it. Not too sure I could write an automated script, considering the earlier issues.
Maybe you could explain again what the other trouble was?
December 6, 2014 at 8:57 am #190071geediParticipantOooh Ok i didnt know. Im lower then a noob with javascript. So i dont understand somtimes when u give me the codes where to put it. Ok now the problem is solved for 90% but there are 3 problems know.
1. The first is is there is a white spot underneath the footer. when i resize the browser to les then 50procent .
2. When u first load it the slider goes a liittle bit to the right (30px) but if i resisze my browser to anything and full screen again its gone.
3. On my laptop i still have to scroll 40px on my pc its even to small that im seeing white stuff beneath the slider.Could u if u dont mind give me the whole code i u dont mind cause i think im putting in the wrong place. thank u very much
<!DOCTYPE html> <!--[if IE 6]> <html id="ie6" <?php language_attributes(); ?>> <![endif]--> <!--[if IE 7]> <html id="ie7" <?php language_attributes(); ?>> <![endif]--> <!--[if IE 8]> <html id="ie8" <?php language_attributes(); ?>> <![endif]--> <!--[if !(IE 6) | !(IE 7) | !(IE 8) ]><!--> <html <?php language_attributes(); ?>> <!--<![endif]--> <head> <?php wp_head(); ?> <meta charset="<?php bloginfo( 'charset' ); ?>"> <meta name="viewport" content="width=device-width"> <meta name="description" content="Add the site description here" /> <meta name="keywords" content="First keyword, second keyword," /> <?php $theme_path = get_template_directory_uri(); ?> <script type="text/javascript"> jQuery(document).ready(function(){ var inputs = document.getElementsByTagName('input'); for (a = 0; a < inputs.length; a++) { if (inputs[a].type == "checkbox") { var id = inputs[a].getAttribute("id"); if (id==null){ id= "checkbox" +a; } inputs[a].setAttribute("id",id); var container = document.createElement('div'); container.setAttribute("class", "ttr_checkbox"); var label = document.createElement('label'); label.setAttribute("for", id); jQuery(inputs[a]).wrap(container).after(label); } } }); </script> <script type="text/javascript"> jQuery(document).ready(function(){ var inputs = document.getElementsByTagName('input'); for (a = 0; a < inputs.length; a++) { if (inputs[a].type == "radio") { var id = inputs[a].getAttribute("id"); if (id==null){ id= "radio" +a; } inputs[a].setAttribute("id",id); var container = document.createElement('div'); container.setAttribute("class", "ttr_radio"); var label = document.createElement('label'); label.setAttribute("for", id); jQuery(inputs[a]).wrap(container).after(label); } } }); </script> <script type="text/javascript" src="<?php echo $theme_path?>/html5shiv.js"> </script> <script type="text/javascript"> jQuery(document).ready(function(){ var window_height = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); var body_height = jQuery(document.body).height(); var content = jQuery("#ttr_content_and_sidebar_container"); if(body_height < window_height){ differ = (window_height - body_height); content_height = content.height() + differ - 40; content.css("height", content_height+"px"); </script> <title> <?php global $page, $paged; wp_title( '|', true, 'right' ); bloginfo( 'name' ); $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) echo " | $site_description"; if ( $paged >= 2 || $page >= 2 ) echo ' | ' . sprintf( __( 'Page %s', CURRENT_THEME ), max( $paged, $page ) ); ?> </title> <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>" type="text/css" media="screen"/> <!--[if lte IE 8]> <link rel="stylesheet" href="<?php echo get_template_directory_uri() ?>/menuie.css" type="text/css" media="screen"/> <link rel="stylesheet" href="<?php echo get_template_directory_uri() ?>/vmenuie.css" type="text/css" media="screen"/> <![endif]--> <script type="text/javascript" src="<?php echo $theme_path?>/prefixfree.min.js"> </script> <!--[if IE 7]> <style type="text/css" media="screen"> #ttr_vmenu_items li.ttr_vmenu_items_parent {display:inline;} </style> <![endif]--> <?php if (get_option('ttr_custom_style')):?> <style> <?php $custom_style = get_option('ttr_custom_style'); echo $custom_style;?> </style> <?php endif;?> </head> <body <?php body_class(); ?>> <?php if(isset($_POST['wp_customize']) && $_POST['wp_customize']=='on'):?> <a href="#" class="back-to-top"><input type="image" alt="Back to Top" src="<?php echo get_template_directory_uri().'/images/gototop.png';?>"/></a> <?php else:?> <?php if(get_option('ttr_back_to_top',true)): ?> <a href="#" class="back-to-top"><input type="image" alt="Back to Top" src="<?php echo get_option('ttr_icon_back_to_top',get_template_directory_uri().'/images/gototop.png');?>"/></a> <?php endif; ?> <?php endif; ?> <div id="ttr_page"> <div class="ttr_banner_header"> <?php if( is_active_sidebar( 'headerabovecolumn1' ) || is_active_sidebar( 'headerabovecolumn2' ) || is_active_sidebar( 'headerabovecolumn3' ) || is_active_sidebar( 'headerabovecolumn4' )): ?> <div class="ttr_banner_header_inner_above0"> <?php if ( is_active_sidebar('headerabovecolumn1') ) : ?> <div class="cell1" style="width:25%;float:left;"> <div class="headerabovecolumn1"> <?php theme_dynamic_sidebar( 'HAWidgetArea00'); ?> </div> </div> <?php else: ?> <div class="cell1" style="width:25%;float:left;background-color:transparent;"> </div> <?php endif; ?> <?php if ( is_active_sidebar('headerabovecolumn2') ) : ?> <div class="cell2" style="width:25%;float:left;"> <div class="headerabovecolumn2"> <?php theme_dynamic_sidebar( 'HAWidgetArea01'); ?> </div> </div> <?php else: ?> <div class="cell2" style="width:25%;float:left;background-color:transparent;"> </div> <?php endif; ?> <?php if ( is_active_sidebar('headerabovecolumn3') ) : ?> <div class="cell3" style="width:25%;float:left;"> <div class="headerabovecolumn3"> <?php theme_dynamic_sidebar( 'HAWidgetArea02'); ?> </div> </div> <?php else: ?> <div class="cell3" style="width:25%;float:left;background-color:transparent;"> </div> <?php endif; ?> <?php if ( is_active_sidebar('headerabovecolumn4') ) : ?> <div class="cell4" style="width:25%;float:right;"> <div class="headerabovecolumn4"> <?php theme_dynamic_sidebar( 'HAWidgetArea03'); ?> </div> </div> <?php else: ?> <div class="cell4" style="width:25%;float:right;background-color:transparent;"> </div> <?php endif; ?> <div style="clear:both;"> </div> </div> <?php endif; ?> </div> <div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div> <?php $var = get_post_meta ( $post->ID, 'ttr_page_head_checkbox', true ); if ($var == "true" || $var == ""):?> <header id="ttr_header"> <div id="ttr_header_inner"> <div class="ttr_slideshow"> <div id="ttr_slideshow_inner"> </div> </div> <div class="ttr_slideshow_in"> <div class="ttr_slideshow_last"> </div> </div> </div> </header> <?php endif; ?> <div class="ttr_banner_header"> <?php if( is_active_sidebar( 'headerbelowcolumn1' ) || is_active_sidebar( 'headerbelowcolumn2' ) || is_active_sidebar( 'headerbelowcolumn3' ) || is_active_sidebar( 'headerbelowcolumn4' )): ?> <div class="ttr_banner_header_inner_below0"> <?php if ( is_active_sidebar('headerbelowcolumn1') ) : ?> <div class="cell1" style="width:25%;float:left;"> <div class="headerbelowcolumn1"> <?php theme_dynamic_sidebar( 'HBWidgetArea00'); ?> </div> </div> <?php else: ?> <div class="cell1" style="width:25%;float:left;background-color:transparent;"> </div> <?php endif; ?> <?php if ( is_active_sidebar('headerbelowcolumn2') ) : ?> <div class="cell2" style="width:25%;float:left;"> <div class="headerbelowcolumn2"> <?php theme_dynamic_sidebar( 'HBWidgetArea01'); ?> </div> </div> <?php else: ?> <div class="cell2" style="width:25%;float:left;background-color:transparent;"> </div> <?php endif; ?> <?php if ( is_active_sidebar('headerbelowcolumn3') ) : ?> <div class="cell3" style="width:25%;float:left;"> <div class="headerbelowcolumn3"> <?php theme_dynamic_sidebar( 'HBWidgetArea02'); ?> </div> </div> <?php else: ?> <div class="cell3" style="width:25%;float:left;background-color:transparent;"> </div> <?php endif; ?> <?php if ( is_active_sidebar('headerbelowcolumn4') ) : ?> <div class="cell4" style="width:25%;float:right;"> <div class="headerbelowcolumn4"> <?php theme_dynamic_sidebar( 'HBWidgetArea03'); ?> </div> </div> <?php else: ?> <div class="cell4" style="width:25%;float:right;background-color:transparent;"> </div> <?php endif; ?> <div style="clear:both;"> </div> </div> <?php endif; ?> </div> <div class="ttr_banner_menu"> <?php if( is_active_sidebar( 'menuabovecolumn1' ) || is_active_sidebar( 'menuabovecolumn2' ) || is_active_sidebar( 'menuabovecolumn3' ) || is_active_sidebar( 'menuabovecolumn4' )): ?> <div class="ttr_banner_menu_inner_above0"> <?php if ( is_active_sidebar('menuabovecolumn1') ) : ?> <div class="cell1" style="width:25%;float:left;"> <div class="menuabovecolumn1"> <?php theme_dynamic_sidebar( 'MAWidgetArea00'); ?> </div> </div> <?php else: ?> <div class="cell1" style="width:25%;float:left;background-color:transparent;"> </div> <?php endif; ?> <?php if ( is_active_sidebar('menuabovecolumn2') ) : ?> <div class="cell2" style="width:25%;float:left;"> <div class="menuabovecolumn2"> <?php theme_dynamic_sidebar( 'MAWidgetArea01'); ?> </div> </div> <?php else: ?> <div class="cell2" style="width:25%;float:left;background-color:transparent;"> </div> <?php endif; ?> <?php if ( is_active_sidebar('menuabovecolumn3') ) : ?> <div class="cell3" style="width:25%;float:left;"> <div class="menuabovecolumn3"> <?php theme_dynamic_sidebar( 'MAWidgetArea02'); ?> </div> </div> <?php else: ?> <div class="cell3" style="width:25%;float:left;background-color:transparent;"> </div> <?php endif; ?> <?php if ( is_active_sidebar('menuabovecolumn4') ) : ?> <div class="cell4" style="width:25%;float:right;"> <div class="menuabovecolumn4"> <?php theme_dynamic_sidebar( 'MAWidgetArea03'); ?> </div> </div> <?php else: ?> <div class="cell4" style="width:25%;float:right;background-color:transparent;"> </div> <?php endif; ?> <div style="clear:both;"> </div> </div> <?php endif; ?> </div> <div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div> <nav id="ttr_menu"> <div id="ttr_menu_inner_in"> <div id="navigationmenu"> <h3 class="menu-toggle"><?php _e('Menu',CURRENT_THEME); ?></h3> <div class="menu-center"> <ul class="ttr_menu_items"> <?php echo theme_nav_menu('ttr_','primary','menu',False);?> </ul> </div> </div> </div> </nav> <div class="ttr_banner_menu"> <?php if( is_active_sidebar( 'menubelowcolumn1' ) || is_active_sidebar( 'menubelowcolumn2' ) || is_active_sidebar( 'menubelowcolumn3' ) || is_active_sidebar( 'menubelowcolumn4' )): ?> <div class="ttr_banner_menu_inner_below0"> <?php if ( is_active_sidebar('menubelowcolumn1') ) : ?> <div class="cell1" style="width:25%;float:left;"> <div class="menubelowcolumn1"> <?php theme_dynamic_sidebar( 'MBWidgetArea00'); ?> </div> </div> <?php else: ?> <div class="cell1" style="width:25%;float:left;background-color:transparent;"> </div> <?php endif; ?> <?php if ( is_active_sidebar('menubelowcolumn2') ) : ?> <div class="cell2" style="width:25%;float:left;"> <div class="menubelowcolumn2"> <?php theme_dynamic_sidebar( 'MBWidgetArea01'); ?> </div> </div> <?php else: ?> <div class="cell2" style="width:25%;float:left;background-color:transparent;"> </div> <?php endif; ?> <?php if ( is_active_sidebar('menubelowcolumn3') ) : ?> <div class="cell3" style="width:25%;float:left;"> <div class="menubelowcolumn3"> <?php theme_dynamic_sidebar( 'MBWidgetArea02'); ?> </div> </div> <?php else: ?> <div class="cell3" style="width:25%;float:left;background-color:transparent;"> </div> <?php endif; ?> <?php if ( is_active_sidebar('menubelowcolumn4') ) : ?> <div class="cell4" style="width:25%;float:right;"> <div class="menubelowcolumn4"> <?php theme_dynamic_sidebar( 'MBWidgetArea03'); ?> </div> </div> <?php else: ?> <div class="cell4" style="width:25%;float:right;background-color:transparent;"> </div> <?php endif; ?> <div style="clear:both;"> </div> </div> <?php endif; ?> </div>
December 6, 2014 at 10:39 am #190089geediParticipantYeah i have ftp acces. and dont know why havent used this yet ok. the last code u said to change made it worse. Which files do u think are the problem.
December 6, 2014 at 12:04 pm #190096geediParticipantok i have done exactly as u said and look how it looks now.
https://www.facebook.com/photo.php?fbid=828682357174773&set=a.339308166112197.76760.100000990491963&type=1&theaterDecember 6, 2014 at 12:16 pm #190099geediParticipantThanks my good friend
December 6, 2014 at 12:25 pm #190103geediParticipantOO yeah i can give u any other file u may need that needs javascript.
Dude javascript is my kryptonite right why is that language so hardDecember 6, 2014 at 1:04 pm #190108geediParticipantThank u very much it is almost fixed i have only two in 1 more problem look at these this first one is of a bigger. It doesnt resize itself after change the browser size this is what happens https://www.facebook.com/photo.php?fbid=828699013839774&set=pcb.828699523839723&type=1&theater
the second one is when u resize the browes to a smaller size this is what happens with the slider.
https://www.facebook.com/photo.php?fbid=828699480506394&set=pcb.828699523839723&type=1&theater.Gozer i cannot thank u enough the amount of help u have given me and time.
From the bottom of my heart i thank u.December 6, 2014 at 1:19 pm #190113geediParticipantfirst pic
http://postimg.org/image/k1l4kgayz/
second pic
http://postimg.org/image/oyyp5kcy3/Also coding is like the mythological beast hydra u cut of 1 head two more comes
December 6, 2014 at 2:40 pm #190127geediParticipantthe first problem is opgelost. Lol just needed to update javascript. the second problem is stil there
December 6, 2014 at 4:14 pm #190130geediParticipantNaa the previous one worked better this one made every problem come back.
December 6, 2014 at 4:15 pm #190131geediParticipantmaybe its not javascript anymore man.
December 7, 2014 at 10:21 am #190188geediParticipantYeah i have made a new thread that other one whas going way to many pages. But yo this code works
jQuery(window).on(‘load’, function() {var content = jQuery(‘#ttr_content_and_sidebar_container’);
content.css(‘min-height’, 457);fullPage();
jQuery(window).resize(function() {fullPage()});
function fullPage() {
var window_height = jQuery(window).height();
var body_height = jQuery(document.body).height();
if (body_height < window_height) {
differ = window_height-body_height;
content_height = content.height()+differ;
content.css(‘height’, content_height);
}
}});
</script>but with your other code that make’s it look get a black background doesnt work on this one
December 7, 2014 at 10:22 am #190189geediParticipantthis is the id that needs to be black ttr_page_inner
-
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.