Results 1 to 5 of 5

Thread: Problem with tables

  1. #1
    Brandon Dennis is offline Newbie Net Builder
    Join Date
    Apr 2009
    Posts
    24
    Thanks
    0
    Thanked 14 Times in 6 Posts

    Problem with DIVs

    I was able to add more divs to my wordpress theme index page but after the first row, it only puts the divs in the first two columns.

    See for yourself:
    DennCorp

    Does anyone know how to fix this?

    Here's the index code if anyone needs it for reference:

    <?php global $kriesi_options; get_header(); ?>

    <?php if($kriesi_options['fill_main'] == 1 || $kriesi_options['fill_main'] == ""){


    //*if you did choose: "edit by html" you can now edit the following lines: *//
    ?>

    <div class="info_box box1">
    <div class="box_image"><!-- insert image here--></div>
    <span class="meta">adipisicing elit, sed do</span>
    <h2>Title A</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
    <p>Ut enim ad minim veniam.<br/><br/> quis nostrud exercitation ullamco laboris nisi ut aliquip ex</p>
    </div>

    <div class="info_box box2">
    <div class="box_image"><!-- insert image here--></div>
    <span class="meta">adipisicing elit, sed do</span>
    <h2>Title B</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
    <p><br/><br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex</p>
    </div>

    <div class="info_box box3">
    <div class="box_image"><!-- insert image here--></div>
    <span class="meta">adipisicing elit, sed do</span>
    <h2>Title C</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.<br/><br/> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
    <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex</p>
    </div>

    <div class="info_box box4">
    <div class="box_image"><!-- insert image here--></div>
    <span class="meta">adipisicing elit, sed do</span>
    <h2>Title D</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.<br/><br/> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
    <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex</p>
    </div>

    <div class="info_box box5">
    <div class="box_image"><!-- insert image here--></div>
    <span class="meta">adipisicing elit, sed do</span>
    <h2>Title E</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.<br/><br/> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
    <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex</p>
    </div>

    <div class="info_box box6">
    <div class="box_image"><!-- insert image here--></div>
    <span class="meta">adipisicing elit, sed do</span>
    <h2>Title F</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.<br/><br/> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
    <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex</p>
    </div>

    <?php
    //stop editing here if you did choose "edit by html"


    }else if($kriesi_options['fill_main'] == 2){
    $query_string .= "&showposts=3";
    $query_string .= "&cat=".$kriesi_options['com_cat'];
    query_posts($query_string);
    $counter = 1;

    if (have_posts()) : while (have_posts()) : the_post();

    $preview_pic_mainpage = get_post_meta($post->ID, "preview_pic_mainpage", true);
    $punchline = get_post_meta($post->ID, "punchline", true);
    ?>


    <div class="info_box box<?php echo $counter; $counter++; ?>">
    <div class="box_image"><img src='<?php echo $preview_pic_mainpage; $preview_pic_mainpage =''; ?>' alt="" /></div>
    <span class="meta"><?php echo $punchline; $punchline='';?></span>
    <h2><?php the_title(); ?></h2>
    <?php the_content('Read more'); ?>
    <?php edit_post_link('Edit','', '' ); ?>
    </div>
    <?php endwhile; endif; ?>


    <?php } ?>
    <?php get_footer(); ?>
    Last edited by Brandon Dennis; 13 February, 2010 at 17:13 PM.

  2. #2
    TopDogger's Avatar
    TopDogger is offline Über Hund
    Join Date
    Jan 2009
    Location
    Hellfire, AZ
    Posts
    3,029
    Thanks
    345
    Thanked 902 Times in 689 Posts
    It would help if you changed the H2 tag for each section to read Title A, Title B, Title C, etc., so that we can see what is going on.

    The way you have it set up now, it is very difficult to troubleshoot just by looking at the code. That's why you are not getting any assistance.
    "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." -- Benjamin Franklin


  3. #3
    Brandon Dennis is offline Newbie Net Builder
    Join Date
    Apr 2009
    Posts
    24
    Thanks
    0
    Thanked 14 Times in 6 Posts
    Alright. I changed it.

    Also, I found a .php document called kriesioptions.php which the document above refers to. I'm not exactly sure what the problem is but kriesioptions contains information about rows, columns, width, and height.

    Here's that document:

    <?php
    global $kriesi_options;

    function k_generate(){
    $options = $newoptions = get_option('kriesi_options');

    if ( $_POST['kriesi_options'] ) {
    $newoptions['slide_page'] = strip_tags(stripslashes($_POST['slide_page']));
    $newoptions['whichdesign'] = strip_tags(stripslashes($_POST['whichdesign']));
    $newoptions['fill_main'] = strip_tags(stripslashes($_POST['fill_main']));
    $newoptions['com_cat'] = strip_tags(stripslashes($_POST['com_cat']));
    $newoptions['com_port'] = strip_tags(stripslashes($_POST['com_port']));
    $newoptions['com_page'] = strip_tags(stripslashes($_POST['com_page']));
    $newoptions['enable_exc_post'] = strip_tags(stripslashes($_POST['enable_exc_post']));
    $newoptions['google_analaytics'] = stripslashes($_POST['google_analaytics']);
    }

    if ( $options != $newoptions ) {
    $options = $newoptions;
    update_option('kriesi_options', $options);
    }

    $slide_page = empty( $options['slide_page'] ) ? "" : $options['slide_page'];
    $whichdesign = empty( $options['whichdesign'] ) ? 1 : $options['whichdesign'];
    $fill_main = empty( $options['fill_main'] ) ? 1 : $options['fill_main'];
    $com_cat = empty( $options['com_cat'] ) ? "" : $options['com_cat'];
    $com_port = empty( $options['com_port'] ) ? "" : $options['com_port'];
    $com_page = empty( $options['com_page'] ) ? "" : $options['com_page'];
    $enable_exc_post = empty( $options['enable_exc_post'] ) ? false : true;
    $google_analaytics = empty( $options['google_analaytics'] ) ? "" : $options['google_analaytics'];

    ?>
    <div class="wrap">
    <h2>Cubit Options</h2>

    <form method="post" action="">
    <table class="form-table">
    <tr valign="top">
    <th scope="row">Cubit Design</th>
    <td><br/>
    <label><input type="radio" name="whichdesign" id="whichdesign" value="1" <?php if ($whichdesign == 1){echo "checked = checked";}?> /> Design 1 - Cubit Light/Blue</label><br/>
    <label><input type="radio" name="whichdesign" id="whichdesign2" value="2" <?php if ($whichdesign == 2){echo "checked = checked";}?>/> Design 2 - Cubit Light/Green</label><br/>
    <label><input type="radio" name="whichdesign" id="whichdesign3" value="3" <?php if ($whichdesign == 3){echo "checked = checked";}?>/> Design 3 - Cubit Light/Orange</label><br/>
    <label><input type="radio" name="whichdesign" id="whichdesign4" value="4" <?php if ($whichdesign == 4){echo "checked = checked";}?>/> Design 4 - Cubit Dark/Pink</label><br/>
    <label><input type="radio" name="whichdesign" id="whichdesign5" value="5" <?php if ($whichdesign == 5){echo "checked = checked";}?>/> Design 5 - Cubit Dark/Gold</label><br/>
    <label><input type="radio" name="whichdesign" id="whichdesign6" value="6" <?php if ($whichdesign == 6){echo "checked = checked";}?>/> Design 6 - Cubit Dark/Crimson</label><br/>
    </td>
    </tr>
    <tr valign="top">
    <th scope="row">Cubit Starting Page Image Slider</th>
    <td><br/>
    Here you can choose which way you want to populate the Image slider on your starting page. <br/>
    You can select an existing page and add all images to this page. If no page is selected the script uses the images defined in your header.php file. If you want to, you can edit the images directly in this file. <br/>

    <select class="postform" id="slide_page" name="slide_page">
    <option value="">Select Page</option>
    <?php
    $pages = get_pages('title_li=&orderby=name');
    foreach ($pages as $page){

    if ($slide_page == $page->ID){
    $selected = "selected='selected'";
    }else{
    $selected = "";
    }
    echo"<option $selected value='". $page->ID."'>". $page->post_title."</option>";
    }
    ?>
    </select>
    </td>
    </tr>



    <tr valign="top">
    <th scope="row">Cubit Starting Page Content</th>
    <td><br/>
    Here you can choose in which way you want to add content to your starting page. <br/>
    You can either choose to edit the index.php file directly, or fill the page with 3 posts. <br/>
    If you choose <strong>posts</strong> please select a category as well. This category will be excluded from the news section.<br/>

    <br/>
    <label><input type="radio" name="fill_main" id="fill_main" value="1" <?php if ($fill_main == 1){echo "checked = checked";}?> /> Use HTML (edit html in index.php)</label><br/>
    <label><input type="radio" name="fill_main" id="fill_main" value="2" <?php if ($fill_main == 2){echo "checked = checked";}?> /> Use Posts</label><br/>

    Category for Posts IF using post is selected:<br/>

    <select class="postform" id="com_cat" name="com_cat">
    <option value="">Select Category</option>
    <?php
    $categories = get_categories('title_li=&orderby=name');
    foreach ($categories as $category){

    if ($com_cat == $category->term_id){
    $selected = "selected='selected'";
    }else{
    $selected = "";
    }
    echo"<option $selected value='". $category->term_id."'>". $category->name."</option>";
    }
    ?>
    </select>
    </td>
    </tr>


    <tr valign="top">
    <th scope="row">Cubit Portfolio Page Content</th>
    <td><br/>
    Here you can choose which category is your portfolio category.<br/> This category will be excluded from the news section.<br/>

    <br/>
    <select class="postform" id="com_port" name="com_port">
    <option value="">Select Category</option>
    <?php
    $categories = get_categories('title_li=&orderby=name');
    foreach ($categories as $category){

    if ($com_port == $category->term_id){
    $selected = "selected='selected'";
    }else{
    $selected = "";
    }
    echo"<option $selected value='". $category->term_id."'>". $category->name."</option>";
    }
    ?>
    </select>
    </td>
    </tr>

    <tr valign="top">
    <th scope="row"><label for="com_page">Page Navigation</label></th>
    <td>

    <input name="com_page" type="text" id="com_page" value="<?php if ($com_page){echo $com_page;}?>" size="70" maxlength="255" /><br/>
    Enter the query string of the pages you want to display in the main menu (top right corner of the page)<br/>
    If left empty it will display all pages<br/>
    Some Examples:<br/>
    <strong>include=9,16,22,24,33</strong> (this would display 5 menu items for the pages with the id 9, 16, 22, 24, 33)<br/>
    <strong>exclude=2,6,12</strong> (this would display menu itemsfor all pages except those with id 2, 6, 12)<br/>
    </td>
    </tr>

    <tr valign="top">
    <th scope="row"><label for="google_analaytics">Google analytics tracking code</label></th>
    <td>
    <textarea class="code" style="width: 98%; font-size: 12px;" id="google_analaytics" rows="10" cols="60" name="google_analaytics">
    <?php if ($google_analaytics){echo $google_analaytics;}?>
    </textarea>
    Enter your analtics tracking code here
    </td>
    </tr>


    </table>

    <p class="submit">
    <input id="kriesi_options" type="hidden" value="1" name="kriesi_options"/>
    <input type="submit" name="Submit" value="Save Changes" /></p>

    </form>

    </div>
    <?php
    }

    ?>

  4. #4
    dtkguy's Avatar
    dtkguy is offline Still Learnin'
    Join Date
    Dec 2008
    Posts
    391
    Thanks
    7
    Thanked 164 Times in 108 Posts
    You have too much right margin on box6, box3 only fits because it looks like you added a margin of zero to it.

    As seen in your style.css :

    Code:
    #top .box3{
        margin-right:0px;
        }
    try changing it to this :
    Code:
    #top .box3, .box6{
        margin-right:0px;
        }

  5. #5
    Brandon Dennis is offline Newbie Net Builder
    Join Date
    Apr 2009
    Posts
    24
    Thanks
    0
    Thanked 14 Times in 6 Posts
    It worked! Thanks, mate.

Similar Threads

  1. [WTH] Need to add new tables to phpbb install
    By kewler in forum Services
    Replies: 0
    Last Post: 20 March, 2010, 11:00 AM
  2. Inserting new tables in PHPBB setup file
    By kewler in forum Databases
    Replies: 0
    Last Post: 10 March, 2010, 06:45 AM
  3. Get tables name from DataBase [vb]
    By ghadeer in forum Databases
    Replies: 7
    Last Post: 16 May, 2009, 14:54 PM
  4. Just a problem
    By Szise in forum Proxy List Support Forum
    Replies: 4
    Last Post: 17 December, 2008, 02:45 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •