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 870887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:33:09+00:00 2026-05-15T10:33:09+00:00

I have the following 2 column div layout. The left column needs to have

  • 0

I have the following 2 column div layout. The left column needs to have a width of 75px to accommodate the image, but the right column needs should flow into all of its parent container.

This grid is in a user control that is being added to multiple sites/pages, each having a different layout so the parent container varies in width – some can be wider, some can be skinnier, hence I can’t use %. If the % is too high it wraps. How can I make this flexible without going for the obvious table option?

<telerik:RadGrid 
        ID="ArticlesGrid" 
        AlternatingItemStyle-BorderStyle="None"
        AlternatingItemStyle-BackColor="Transparent"
        BorderStyle="None"
        PageSize="20" 
        runat="server" 
        AllowPaging="True"
        GridLines="None"
        >
        <PagerStyle Mode="NumericPages" BackColor="#FFFFFF" AlwaysVisible="false"  ShowPagerText="false" EnableSEOPaging="True"></PagerStyle>
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="Id">

            <HeaderStyle BackColor="#FFFFFF" BorderStyle="None"  />
            <Columns>
                <telerik:GridTemplateColumn>
                    <ItemTemplate>
                        <div id="AllArticles_LeftColumn" style="float: left; width: 75px; margin-right: 40px;">
                            <a id="lnkArticleImage" runat="server">
                                <img runat="server" src='<%# Eval("ThumbnailImagePath")%>'  class="ArticleImage"
                                    alt='<%# Eval("ImageAltText")%>' id="imgArticle" />
                            </a>
                        </div>
                        <div id="AllArticles_RightColumn" style="float: left;">
                            <h1>
                                <asp:HyperLink CssClass="ArticleTitle" ID="lnkHeadline" runat="server" Text='<%# Eval("Headline")%>'></asp:HyperLink>
                            </h1>
                            <asp:Label ID="litContent" CssClass="ArticleBody" Text='<%# Eval("PreviewText")%>'
                                runat="server"></asp:Label><br />
                            <br />
                            <small>
                                <a id="lnkReadMore" class="ArticleReadMore" runat="server">
                                <%# Eval("LinkText")%></a>
                            </small>
                            <br />
                            <br />
                            <div>
                                <div style="float: left;" id="AllArticlePostedBy">
                                    <small><span class="ArticlePostedBy">Posted </a>
                                        on 
                                        <asp:Label ID="lblDatePosted" runat="server" Text='<%# String.Format("{0:MMMM dd yyyy}", Eval("PublicationUTC")) %>'></asp:Label>
                                    </span>
                                    </small>
                                </div>
                                <div id="AllArticleCommentCount" style="float:right;">
                                <asp:Panel ID="pnlCommentsDisabled" Visible="true" runat="server">
                                    <span style="color: #cccccc; text-align: right;">Comments Disabled</span>
                                </asp:Panel>
                            </div>
                            </div>
                            <div class="ArticleSeperator">&nbsp;</div>
                        </div>
                    </ItemTemplate>

                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings EnableAlternatingItems="false"></ClientSettings>
    </telerik:RadGrid>
  • 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-15T10:33:09+00:00Added an answer on May 15, 2026 at 10:33 am

    without providing a ready-to-use solution, I’d like to give you some hints. Usually this problem is solved using a floating Pattern. The trick is to use fixed padding Values for the fixed column (like 75px) and no width at all for the main column, which will use up the existing space.

    This quite old and pretty good article from some css pioneers explains how it is done:
    http://www.alistapart.com/articles/holygrail

    Here is a quick extracted snipped (you’ll need to read the article above, though, to be able to use it, i guess)

    #container .column {
      position: relative;
      float: left;
    }
    #center {
      padding: 10px 20px;    /* CC padding */
      width: 100%;
    }
    #left {
      width: 180px;          /* LC width */
      padding: 0 10px;       /* LC padding */
      right: 240px;          /* LC fullwidth + CC padding */
      margin-left: -100%;
    }
    

    This should help you solving your Problem yourself 🙂

    Best regards,

    UPDATE: Yes i see that the example will provide a solution for a three-column layout, while only a two-column solution is needed. In fact, a two-column solution is even much easier to achieve. You’ll have to work on it a bit, though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code where the image is higher than 44px: <div style=width:300px;display:-ms-grid;-ms-grid-rows:44px
I have the following 3 column layout: <div id=outerwrap> <div id=innerwrap> <div id=centerc>...</div> <div
Following HTML block: <html> <body> <div style=background-color: #fecfff;> <div style=float:left;> <div style=height:40px; width:40px; background-color:Red>
I have the following aspx : <div id=columns runat=server> <ul id=column1 class=column > <!--
I have the following table in my HTML: <div style=max-width:700px;> <table border=1> <tr><td colSpan=2>this
I have the following HTML snippet: Block 1: <div style="position: absolute; top: 105px; left:
i have a multi-column layout where #content-primary is the div i want the actual
I have the following HTML file: <!-- this is column 1 --> <div class=repairGuruBoxRC>
I have a two column layout: <html> <head></head> <body> <div id=container> <div id=header></div> <div
I have the following scenario: a two column layout made up of divs A

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.