Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Make my minum height smaller and no scroll bar

  • This topic is empty.
Viewing 15 posts - 16 through 30 (of 32 total)
  • Author
    Posts
  • #190038
    geedi
    Participant

    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.

    #190040
    Shikkediel
    Participant

    It’s probably common courtesy to the other members to stick to English though. ;-) Will have another look to see what you mean.

    #190042
    Shikkediel
    Participant

    Okay, 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?

    #190071
    geedi
    Participant

    Oooh 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;">
    &nbsp;
    </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;">
    &nbsp;
    </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;">
    &nbsp;
    </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;">
    &nbsp;
    </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;">
    &nbsp;
    </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;">
    &nbsp;
    </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;">
    &nbsp;
    </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;">
    &nbsp;
    </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;">
    &nbsp;
    </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;">
    &nbsp;
    </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;">
    &nbsp;
    </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;">
    &nbsp;
    </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;">
    &nbsp;
    </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;">
    &nbsp;
    </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;">
    &nbsp;
    </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;">
    &nbsp;
    </div>
    <?php endif; ?>
    <div style="clear:both;">
    </div>
    </div>
    <?php endif; ?>
    </div>
    
    #190089
    geedi
    Participant

    Yeah 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.

    #190096
    geedi
    Participant
    #190099
    geedi
    Participant

    Thanks my good friend

    #190103
    geedi
    Participant

    OO 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 hard

    #190108
    geedi
    Participant

    Thank 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.

    #190113
    geedi
    Participant

    first 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

    #190127
    geedi
    Participant

    the first problem is opgelost. Lol just needed to update javascript. the second problem is stil there

    #190130
    geedi
    Participant

    Naa the previous one worked better this one made every problem come back.

    #190131
    geedi
    Participant

    maybe its not javascript anymore man.

    #190188
    geedi
    Participant

    Yeah 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

    #190189
    geedi
    Participant

    this is the id that needs to be black ttr_page_inner

Viewing 15 posts - 16 through 30 (of 32 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.