Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6170139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:58:40+00:00 2026-05-23T22:58:40+00:00

So what I am trying to do is have the leftcontent div floated to

  • 0

So what I am trying to do is have the leftcontent div floated to the left, the rightcontent div floated to the left and position the content div inbetween them. When I adjusted the height of the album div to an actual pixel size instead of auto it worked perfectly fine, but with the height being auto it doesn’t float the divs properly.

To see what the current code is doing you can go to http://www.robhorlacher.ca/images.php to give it a look at.

HTML

    <?
    print "<div id=\"ccontainer\">";
    $execute_statement = "SELECT COUNT(*) FROM ImageAlbums";

    $results = mysql_query($execute_statement) or die ('Error executing SQL statement!!!');

    $entries =  mysql_fetch_row($results);

    $rownumber = $entries[0];

    $totalperpage = 3;

    $totalpages = ceil($rownumber / $totalperpage);

    if (isset($_GET['currentpage']) && is_numeric($_GET['currentpage'])) {

        $currentpage = (int) $_GET['currentpage'];

    } else {

        $currentpage = 1;
    }

    if ($currentpage > $totalpages) {

        $currentpage = $totalpages;
    }

    if ($currentpage < 1) {

        $currentpage = 1;

    }

    $offset = ($currentpage - 1) * $totalperpage;


    $execute_statement2 = "SELECT * FROM ImageAlbums LIMIT $offset, $totalperpage";

    $results2 = mysql_query($execute_statement2) or die ('Error executing SQL statement2!!!');

            while ($row = mysql_fetch_array($results2)) {

            $albumid = $row["AlbumID"];
            $album = $row["Album"];

    print "<div id=\"album\">";

    print "<div id=\"titlebar\">";

    print "<div id=\"lefttitle\"></div>";
    print "<div id=\"title\">";
    print "<br>";
    print "<br>";
    print $album;
    print "</div>";
    print "<div id=\"righttitle\"></div>";
    print "<div id=\"titlefooter\"></div>";

    print "</div>";

    print "<div id=\"contentarea\">";

    print "<div id=\"leftcontent\"></div>";
    print "<div id=\"content\">";

    $execute_statement3 = "SELECT * FROM Images WHERE AlbumID = $albumid";

        $results3 = mysql_query($execute_statement3) or die ('Error executing SQL statement3!!!');

            while ($row2 = mysql_fetch_array($results3)) {

            $picture = $row2["Extensions"];
            $description = $row2["Description"];

    print "<div id=\"image\">";
    print "<br>";
            print "<a href= \"uploads/$picture\" rel=\"shadowbox\">";
            print "<img src = \"uploads/$picture\" width=\"162\" height=\"162\">";
            print "</a>";
            print "</a>";
            print "<br>";
            print $description;
    print "</div>";
            }

    print "<div id=\"imgfooter\"></div>";

    print "</div>";

    print "<div id=\"rightcontent\"></div>";
    print "<div id=\"footercontent\"></div>";

    print "</div>";

    print "</div>";


            }
    print "</div>";

CSS


@charset "utf-8";
/* CSS Document */

* {
    margin: 0px;
    padding: 0px;
    margin: auto;
    border-top-width: 0px;
    border-right-width: 0px;
    border-bottom-width: 0px;
    border-left-width: 0px;
}

body {
    background-color: #000; 
}

#ccontainer {
    width: 900px;


}

#ccontainer #album {
    width: 900px;
    height: auto;

}

#ccontainer #album #titlebar {
    width: 900px;
    height: 136px;  
}

#ccontainer #album #titlebar #lefttitle {
    width: 26px;
    height: 136px;
    float: left;
    background-color: #161616;
}

#ccontainer #album #titlebar #title {
    width: 211px;
    height: 136px;
    float: left;
    background-image: url(../images/album_title.jpg);
    font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
    color: #161616;
    text-align: center;
    vertical-align: bottom;
    font-size: 28px;
}

#ccontainer #album #titlebar #righttitle {
    width: 663px;
    height: 136px;
    float: left;
    background-image: url(../images/right_albumtitle.jpg);
}

#ccontainer #album #titlebar #titlefooter {
    width: 900px;
    clear: both;
}

#ccontainer #album #contentarea {
    width: 900px;
    height: auto;
}

#ccontainer #album #contentarea #leftcontent {
    width: 118px;
    height: auto;
    background-color: #161616;
    background-image: url(../images/under_albumtitle.jpg);
    float: left;
    background-repeat: no-repeat;
}

#ccontainer #album #contentarea #content {
    width: 694px;
    height: auto;
    float: right;
    background-color: #161616;
}

#ccontainer #album #contentarea #rightcontent {
    width: 88px;
    height: auto;
    float: right;
    background-color: #161616;
}

#ccontainer #album #contentarea #footercontent {
    width: 900px;
    clear: both;
}

#ccontainer #album #contentarea #content #image {
    width: 217px;
    height: 207px;
    background-image: url(../images/Image_Box.jpg);
    font-family: Verdana, Geneva, sans-serif;
    color: #000;
    margin: auto;
    text-align: center;
    float: left;
}

#ccontainer #album #contentarea #content #imgfooter {
    width: 694px;
    clear: both;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T22:58:41+00:00Added an answer on May 23, 2026 at 10:58 pm

    This is happening, because those div‘s are empty. A div either has to have content or a specified height to show up on a page. With that being said, I think I see what you are trying to do. Here were the settings I changed:

    #ccontainer #album #contentarea {
        background-color: #161616;
        height: auto;
        width: 900px;
    }
    
    #ccontainer #album #contentarea #leftcontent {
        background-color: #161616;
        background-image: url("../images/under_albumtitle.jpg");
        background-repeat: no-repeat;
        float: left;
        height: 207px;
        width: 118px;
    }
    
    #ccontainer #album #contentarea #rightcontent {
        background-color: #161616;
        float: left;
        height: 207px;
        width: 88px;
    }
    
    #ccontainer #album #contentarea #content {
        background-color: #161616;
        float: left;
        height: auto;
        width: 694px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

With jQuery I am trying to determine whether or not <div> has content in
trying to have the appearance of an image sliding from left to right continuously
I have trying a simple repeat animation on xaml page as below: <StackPanel Canvas.Left=1
I trying to have a div with child divs that form 2 or more
I have trying to expend my window to maximum and them I am moving
Afternoon, I am trying have an HTML file containing a frameset which contains two
Trying to have my PHP script return some SQL table queries. Here's my script
I have a cache directory I'm trying to have ignored by git which lives
I am trying to have a running average column in the SELECT statement based
We are trying to have faxes automatically be sent from within an SSIS package.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.