Diventare Creative
Diventare Creative

Reputation: 481

Issue with positioning a div

I am working on a site laid out with divs. I am having trouble with one in particular: the training photo div.

If you go to http://php.wmsgroup.com/eofd6.org/education.html you'll see a photo underneath the left nav that has dropped down. I want it to snap right under that nav box. I have tried several different things with its positioning as well as the main content divs positioning and I can't get it right.

Any help would be appreciated. The link to the style sheet is http://php.wmsgroup.com/eofd6.org/in.css

Thanks!

Upvotes: 1

Views: 324

Answers (3)

Rob Allen
Rob Allen

Reputation: 17749

In order to get more predictable results, I would create an over-all wrapper, then 2 column wrappers. You're close to this layout now, so it would be a simple fix.

<html>
<head>
    <style type="text/css">
        #leftColumn {
            width: 30%;
            margin: 0px;
            float: left;
            display: inline;
            clear: left;
        }

         #rightColumn{
            width: 60%; /* allow 10% for flex/margins */
            margin: 0px auto;
            float: left;
            display: inline; 
            clear: right;
        }

    </style>
</head>
<body>
    <div id="pageWrapper">
        <div id="header"></div>
        <div id="leftColumn">
            <div id="nav"> </div>
            <div id="training_photo"> </div>
        </div>
        <div id="rightColumn">
             <div id="content"> </content>
        </div>
    </div>
    <div id="footer"> </footer>
</body>

Upvotes: 1

jakber
jakber

Reputation: 3569

Can't you change the markup to include the #training_photo div in the #nav div?

Upvotes: 0

Steve Paulo
Steve Paulo

Reputation: 18154

Float #content right, not left.

Upvotes: 1

Related Questions