Needs help with to create a table (colspan/rowspan )with CSS

Discussion in 'CSS' started by megetron, Mar 3, 2010.

  1. #1
    Hello,
    I am looking for a way to create a table showing below (I colored the divs there so you can see how the table is divided). I need to create it using DIV only.

    [​IMG]


    This is the HTML:
    <div class="box">
    <div id="divTitle" class="Title">
    Title...
    </div>
    <div id="divYear" class="Year" >(2000)</div>


    <div id="divAbstract" runat="server" visible="false" class="Abstract">
    <%=Helpers.RewriteUrl(Article.ArticleID, Article.Title, Helpers.CutText(Article.Abstract,AbstractLength,true) , true)%>
    </div>

    <div id="divImage" class="Image" >
    <img src='thumb.ashx?img=covers/sominage.jpg alt="" />
    </div>
    </div>

    Please note that I cannot change the HTML/DIVS position at all, this is the html template and on it I change only CSS file to make the page looks different.

    I tried display:table but failed.

    Please help me CSS gurus...
    Thank you all!
     
    megetron, Mar 3, 2010 IP
  2. pmek

    pmek Guest

    Messages:
    101
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I'm not 100% sure what you are trying to achieve. If you could explain your problem a bit further then I'll try and help you as best I can.
     
    pmek, Mar 4, 2010 IP
  3. typingmums

    typingmums Well-Known Member

    Messages:
    1,446
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    140
    #3
    I think... although I'm not sure either?! That they want to create a table using divs... and they want to know the CSS needed to achieve this... I THINK??
     
    typingmums, Mar 4, 2010 IP
  4. megetron

    megetron Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    That's right. I want to create a table using divs.
    this code simulates what I really want to achieve with divs:

    <table><tr><td>
    <table>
    <tr><td>1</td></tr>
    </table>
    </td></tr>
    <tr><td>
    <table>
    <tr>
    <td>2</td>
    <td>3</td>
    </tr>
    <tr>
    <td colspan="2">4</td>
    </tr>
    </table>
    </table>

    Here is an image of how it looks like:
    [​IMG]


    I hope I explained myself better.
    Is it possible achieving it with CSS , please help.
     
    megetron, Mar 4, 2010 IP
  5. megetron

    megetron Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    ther is no way of doing it?
     
    megetron, Mar 5, 2010 IP