/    Sign up×
Community /Pin to ProfileBookmark

How do I set up three columns like this?

Does anyone know how I would get a page set up like this?

[url]http://i.imgur.com/cxLmGkl.png[/url]

[code]
.pagecontainer {
margin-top:50px;
padding-left:50px;
padding-right:50px;
position:relative;
width:80%;
height:450px;
}
.leftcolumn {
width: 250px;
}
.middlecolumn {
margin-left:250px;
padding-left:25px;
margin-right:300px;
padding-right:25px;
float:left;
display:inline;
}
.verticalimage {
float:right;
display:inline;
width:300px;
}[/code]

[CODE]
<div class=”pagecontainer”>

<div class=”leftcolumn”>text <br> text <br> text</div>

<div class=”middlecolumn”>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sit amet lorem velit. Nullam et metus eget nunc egestas laoreet et quis ligula. Vivamus lobortis sodales pulvinar. Nunc malesuada pretium ornare. Aliquam ut erat at magna pellentesque elementum. Fusce facilisis lorem et tortor euismod bibendum.</div>

<img class=”rightverticalimage” src=”picture1.png”/>

</div>
[/CODE]

  • A page container with dynamic width of 80% of browser window

  • Inside it are 3 sections:

  • Left text column of 250px width, 50px margin to the left against pagecontainer

  • Right column is an image of 300px width, 50px margin to right against pagecontainer

  • Middle column is whatever space that’s left in the middle, dynamic width
  • I’ve tried various combinations of floats and display types (block, inline-block, etc) but can’t get it to work. The vertical image keeps getting bumped below the middle column of text.

    Thanks.

    [canned-message]attachments-removed-during-migration[/canned-message]

    to post a comment
    CSS

    3 Comments(s)

    Copy linkTweet thisAlerts:
    @cootheadMar 06.2013 — Hi there Windbrand,

    check out the attachment, to see a possible solution. ?

    [i]coothead[/i]

    [canned-message]attachments-removed-during-migration[/canned-message]
    Copy linkTweet thisAlerts:
    @WindbrandauthorMar 06.2013 — Thanks I've tried that on my page but it won't work still. It's really weird your test page works perfectly, I pretty much copied over the code on mine but it still won't work...

    Here is my code:

    <i>
    </i>.pagecontainer {
    overflow-y:auto;
    overflow-x:hidden;
    background: transparent url(pagecontentoverlay.png);
    width:80%;
    min-width:800px;
    padding:30px 0;
    height:500px;
    margin: 0 auto;
    font-size:12px;
    color:#999;
    }

    .pagecontainer&gt;div{
    padding-left:50px;
    padding-right:50px;
    position:relative;
    }

    .middlecolumn {
    padding:10px;
    margin:0 300px 0 273px;
    }

    .rightverticalimage {
    float:right;
    width:200px;
    padding:10px;
    }

    .leftcolumn{
    float:left;
    width:250px;
    padding:10px;
    font-size:16px;
    text-align:left;
    border-right:thin solid #fff;
    }


    <i>
    </i>&lt;div class="pagecontainer"&gt;

    <i> </i>&lt;div id="lisztwork3page"&gt;

    <i> </i> &lt;div class="leftcolumn"&gt;
    <i> </i> &lt;a href="#lisztpage" class="link_expandContainer" onclick="return false"&gt;Back to main&lt;/a&gt;
    <i> </i> &lt;p&gt;
    <i> </i> &lt;font size="-1"&gt;
    <i> </i> &lt;a href="#lisztwork1page"&gt;Hungarian Rhapsody No.2&lt;/a&gt;
    <i> </i> &lt;p&gt;
    <i> </i> &lt;a href="#lisztwork2page"&gt;La Campanella&lt;/a&gt;
    <i> </i> &lt;p&gt;
    <i> </i> &lt;b&gt;| Transcendental Etude No.4 |&lt;/b&gt;
    <i> </i> &lt;p&gt;
    <i> </i> &lt;a href="#lisztwork4page"&gt;Transcendental Etude No.5&lt;/a&gt;
    <i> </i> &lt;p&gt;
    <i> </i> &lt;a href="#lisztwork5page"&gt;Transcendental Etude No.8&lt;/a&gt;
    <i> </i> &lt;/font&gt;
    <i> </i> &lt;p&gt;
    <i> </i> &lt;/div&gt;

    <i> </i> &lt;div class="middlecolumn"&gt;
    <i> </i> &lt;b&gt;Transcendental Etude No.4 "Mazeppa"&lt;/b&gt;
    <i> </i> &lt;br&gt;
    <i> </i> &lt;br&gt;
    <i> </i> &lt;br&gt;
    <i> </i> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum luctus justo eget lorem porta iaculis.
    <i> </i> Fusce dictum ipsum in turpis pellentesque pellentesque. Pellentesque facilisis, nulla sed suscipit dignissim,
    <i> </i> lacus sem dictum ligula, vel facilisis neque mi eu purus. Sed quis erat velit, sit amet volutpat urna. Aliquam erat volutpat.
    <i> </i> Cras purus diam, volutpat porttitor blandit sit amet, tempor et risus. Aenean pharetra nisi quis nisi vestibulum ut molestie
    <i> </i> lacus aliquam. Curabitur vitae nisi orci, quis dapibus mauris. Sed leo magna, facilisis eget auctor non, pharetra ac mauris.
    <i> </i> Vestibulum massa felis, tincidunt ac tristique ut, tincidunt nec tortor.
    <i> </i> &lt;/div&gt;
    <i> </i> &lt;br&gt;
    <i> </i> &lt;br&gt;
    <i> </i> &lt;br&gt;

    <i> </i> &lt;img class="rightverticalimage" src="http://api.ning.com/files/GTfAIob4Rdv8a6DlFSc9WysVp-JgbpduT7uYIE8j1ikuGsgC-29xobgn8H0TmQ9BToHy0hy9EZThN*qhBF9Kqs0MJs0O-XQJ/musicnotes.jpg" alt=""/&gt;

    <i> </i>&lt;/div&gt;

    &lt;/div&gt;


    I have no idea what's wrong :/

    I have uploaded the files.

    (btw just using a test image for the right column)

    [canned-message]attachments-removed-during-migration[/canned-message]
    Copy linkTweet thisAlerts:
    @cootheadMar 06.2013 — Hi there Windbrand,

    when I try to open your attachment with "[i]WinZip[/i]", I get this message...


    [indent][b][color=navy]

    Cannot open file: it does not appear to be a valid archive.

    [/color]
    [/b]


    [/indent]


    I would have [b]added[/b] yours to mine, not the other way round. ?

    [i]coothead[/i]

    [canned-message]attachments-removed-during-migration[/canned-message]
    ×

    Success!

    Help @Windbrand spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.18,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @nearjob,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,
    )...