Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Resizing table cell

Resizing table cell

Scheduled Pinned Locked Moved Web Development
phphtmlcsscomlinux
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Matt Cavanagh
    wrote on last edited by
    #1

    Hi, ive got a image which I want to use sort of like a window in windows or linux(where theres borders around the sides with a title bar at the top and they all stretch around acording to the size of the content in the middle. Heres an example of the box with borders so you can see what I mean. The big middle one is where the content should go. But what would the correct HTML and CSS for it to all stretch right? Please take a look at the image and at my current code below: <a href="http://img269.imagevenue.com/img.php?image=15336\_examplebox\_122\_143lo.jpg">http://img269.imagevenue.com/img.php?image=15336\_examplebox\_122\_143lo.jpg</a>[<a href="http://img269.imagevenue.com/img.php?image=15336\_examplebox\_122\_143lo.jpg" target="_blank" title="New Window">^</a>] <code><div id="test" style="width:300px; height:400px; position:absolute; background-color:Red; top:100px; left:100px;">             <table   style="width:100%; height:100%;" cellpadding="0" cellspacing="0">                   <tr>                         <td style="width:31px; height:29px;">                               <img src="themes/topleft.png" alt="" />                         </td>                         <td>                               <img style="width:100%; height:29px;" src="themes/topmiddle.jpg" alt="" />                         </td>                         <td style="width:31px; height:29px;">                               <img src="themes/topright.png" alt="" />                         </td>              &nb

    A 1 Reply Last reply
    0
    • M Matt Cavanagh

      Hi, ive got a image which I want to use sort of like a window in windows or linux(where theres borders around the sides with a title bar at the top and they all stretch around acording to the size of the content in the middle. Heres an example of the box with borders so you can see what I mean. The big middle one is where the content should go. But what would the correct HTML and CSS for it to all stretch right? Please take a look at the image and at my current code below: <a href="http://img269.imagevenue.com/img.php?image=15336\_examplebox\_122\_143lo.jpg">http://img269.imagevenue.com/img.php?image=15336\_examplebox\_122\_143lo.jpg</a>[<a href="http://img269.imagevenue.com/img.php?image=15336\_examplebox\_122\_143lo.jpg" target="_blank" title="New Window">^</a>] <code><div id="test" style="width:300px; height:400px; position:absolute; background-color:Red; top:100px; left:100px;">             <table   style="width:100%; height:100%;" cellpadding="0" cellspacing="0">                   <tr>                         <td style="width:31px; height:29px;">                               <img src="themes/topleft.png" alt="" />                         </td>                         <td>                               <img style="width:100%; height:29px;" src="themes/topmiddle.jpg" alt="" />                         </td>                         <td style="width:31px; height:29px;">                               <img src="themes/topright.png" alt="" />                         </td>              &nb

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      roguemat wrote:

      It seems to work ok without the central image. But not with it.

      I think the central image is taking a lots of spaces. Why dont you put it in fixed width and height so that you can change it whenever you are changing the width of td.

      Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


      My Latest Articles-->** Simplify Code Using NDepend
      Basics of Bing Search API using .NET
      Microsoft Bing MAP using Javascript

      A 1 Reply Last reply
      0
      • A Abhishek Sur

        roguemat wrote:

        It seems to work ok without the central image. But not with it.

        I think the central image is taking a lots of spaces. Why dont you put it in fixed width and height so that you can change it whenever you are changing the width of td.

        Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


        My Latest Articles-->** Simplify Code Using NDepend
        Basics of Bing Search API using .NET
        Microsoft Bing MAP using Javascript

        A Offline
        A Offline
        apraev
        wrote on last edited by
        #3

        I think that no problem with central image.

        A 1 Reply Last reply
        0
        • A apraev

          I think that no problem with central image.

          A Offline
          A Offline
          Abhishek Sur
          wrote on last edited by
          #4

          Then let me know what exactly the problem is. If you use Tables, it tends to increase the percentage size of a cell if the content exceeds the limit, if not defined with Fixed width and height. So if the layout is not exactly what you want, you might use Divs to create the same layout with appropriate css. :)

          Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


          My Latest Articles-->** Simplify Code Using NDepend
          Basics of Bing Search API using .NET
          Microsoft Bing MAP using Javascript

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups