SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Hybrid View

  1. #1
    SitePoint Enthusiast Chunks's Avatar
    Join Date
    May 2002
    Location
    Australia
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Col & Row heights & widths Question.

    Hi all,

    this is my first post.....

    i use dreamweaver, and i have a problem with table cells (who doesn't i hear you say ), i can't seem to adjust the width or height BELOW 15px, i seem to have in mind that its done with the colspan or rowspan tag... is this correct, can someone set me straight on the correct use of these.... or please explain another method i can use to constrain the table cells to a smaller size...

    some how in my self-taught education i have managed to miss this vital aspect of HTML/wed design and now its really bugging me...

    ohh... if it envolves editing the code directly in "code view" thats cool... i can manage that....

    thanks in advance
    Chunks

  2. #2
    SitePoint Evangelist
    Join Date
    Jul 2001
    Location
    UK
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you post the <table> code?

  3. #3
    Rehab is for quiters! spartan's Avatar
    Join Date
    Apr 2002
    Location
    Cape Town, South Africa
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    here is something to play around with... just a table with 6 columns and 4 rows. I just coloured in some sells to show you how the collspan and rowspans work.

    as far as the height and width go. I don't think the height can go that small, not shure, by the width can definitely go smaller that 15 px.

    Code:
    <HTML>
    <HEAD>
    <TITLE></TITLE>
    </HEAD>
    <BODY>
    <table width=100% border=1 height=100%>
    <tr height=20%>
    	<td rowspan=4 width=5px bgcolor=blue> <font color=white size=4>this cell spans over all 4 rows and only the first collumn</td>
    	<td width=10%></td>
    	<td width=10%></td>
    	
    	<td width=20%></td>
    	<td width=20%></td>
    	<td width=20%></td>
    	
    </tr>
    <tr height=20%>
    	<td rowspan=3 colspan=2 bgcolor=red> <font color=white size=4>this cell spans over 2 collumns and 3 rows</font></td>
    	<td></td>
    	<td></td>
    	<td></td>
    </tr>
    <tr height=20%>
    	<td rowspan=2 colspan=2 bgcolor=green> <font color=white size=4>this cell spans over 2 collumns and 2 rows</font></td>
    	<td></td>
    </tr>
    <tr>
    	<td></td>
    	
    </tr>
    
    
    
    </table>
    </BODY>
    </HTML>
    Spartan
    ---------------------
    It's like our sergeant told us before one trip into the jungle. Men! Fifty of you are leaving on a mission. Twenty-five of you ain't coming back.
    -Mr.Payne

  4. #4
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Lancaster, PA
    Posts
    3,019
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Piece of cake!

    Hey Chunk,

    I struggled with this too for quite a while with Dreamweaver. The trick to get the table cells smaller is to use a clear spacer gif and set the dimesions to the size of the cell you want. Dreamweaver makes it easy to insert a spacer, and I usually go into the html to edit the height and width myself. Then you can scale down the dimensions of the cell to match the spacer image with no problem.

    Hope this helps, and let me know if you have any trouble.

    Regards,

    Steve

  5. #5
    blonde.... Sarah's Avatar
    Join Date
    Jul 2001
    Location
    Berkshire, UK
    Posts
    7,442
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Steve is spot on in his answer, usually if you want a blank cell you would place a & n b s p ; (without the spaces of course) but that space has the standard height of text ie about 12-15px I think. If you remove the non-breaking-space then that would cause problems in some browsers (namely NS) so for your solution a thin blank transparent gif file is what si called for

    good luck and welcome to the Sitepoint forum, please drop by here and introduce your self

    Sarah
    Regular user

  6. #6
    SitePoint Wizard iTec's Avatar
    Join Date
    May 2001
    Location
    Sydney, Australia
    Posts
    2,243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    or if your slightly more adventurouse you could use css to do it

    .lowcell { height: 4px; line-height: 4px}

    <tr>
    <td class="lowcell">& nbsp;</td>
    <td class="lowcell">& nbsp;</td>
    </tr>

    It makes any text you put in this cell unreadable because of the line height, NN4 supports the line-height, but doesnt support the height, so im not sure what it would display..

  7. #7
    SitePoint Enthusiast Chunks's Avatar
    Join Date
    May 2002
    Location
    Australia
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    thanks all for the help

    Hi,

    success at last!!!

    i had good results using transparent spacers and now my web page is coming together nicely, but those tables can still be a pain at times at least they are easier to handle now.... thankyou thankyou...

    Regards
    Chunks
    Australia


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •