Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
  1. #1
    Member Line's Avatar
    Join Date
    Sep 2004
    Posts
    39
    Member #
    7391
    Why is my width being pushed to be larger?

    I have this site that i'm currently working on:
    http://www.linedetail.com

    Every page is fine except for:
    http://www.linedetail.com/contactus2006.php

    For some reason the html of the content in that page is causing the words "Web Hosting & Domain Names" on the left menu to be put on two lines.

    I've deleted and removed the table that's holding the contact info repeatedly and it's contents. Unless the whole table is removed for it, that is the only time when the words will look normal on the left.

    So, if you can, help me figure out why it is that the content on this page is pushing the center column to be larger than the other pages.

    Thanks,
    -Line
    http://www.LineDetail.com | The LineDetail Drawing Co. | Theme-Based Web Site Design, Art & Animation

  2.  

  3. #2
    Member allyharp's Avatar
    Join Date
    Jul 2004
    Location
    Scotland
    Posts
    72
    Member #
    6695
    The answer lies in the code comments
    HTML Code:
    <td valign="top" width="704" style="padding-left:5px; padding-right:5px"><!--- Anything in here must be 694 pixels or less in width --->
    It says right there that the middle section must not be more than 694 pixels. You have 704.
    Currently using: Firefox 1.5, IE 7, Notepad, Ms Paint, GIMP

  4. #3
    Member Line's Avatar
    Join Date
    Sep 2004
    Posts
    39
    Member #
    7391
    That comment is in that cell.
    The cell says width="704" and then there's padding on the left and right of 5 pixels each making the space available for content only 694

    The table within that cell is the one causing the problem :\

    -Line
    http://www.LineDetail.com | The LineDetail Drawing Co. | Theme-Based Web Site Design, Art & Animation

  5. #4
    Member allyharp's Avatar
    Join Date
    Jul 2004
    Location
    Scotland
    Posts
    72
    Member #
    6695
    There's no width set for the table that appears within the cell. If you define the width as 694 it should sort it.
    Currently using: Firefox 1.5, IE 7, Notepad, Ms Paint, GIMP

  6. #5
    Member Line's Avatar
    Join Date
    Sep 2004
    Posts
    39
    Member #
    7391
    Nope that didn't work

    -Line
    http://www.LineDetail.com | The LineDetail Drawing Co. | Theme-Based Web Site Design, Art & Animation

  7. #6
    Member Line's Avatar
    Join Date
    Sep 2004
    Posts
    39
    Member #
    7391
    Well, I couldn't stand the table so I just removed it. Crappy way to fix this problem but it seemed the only one that worked.

    So Now I have the content fitting correctly.. next up - I'm going to have to figure out if my table's column-widths are actually the size they should be.

    -Line
    http://www.LineDetail.com | The LineDetail Drawing Co. | Theme-Based Web Site Design, Art & Animation

  8. #7
    Junior Member
    Join Date
    May 2006
    Location
    Tampa, FL
    Posts
    13
    Member #
    13287
    I am interested in this thread because I am having issues with table column widths. I have a site that has a 3-column background with the content in the center column. I am trying to center the content within a browser. In order to do this, I have set the width of the left and right columns at 50%. For the center, I am trying to set the width for 1000px. However, the center column simply squeezes to less than 1000px to the widest image in the column. Is there a different way that I need to do this than to set widths within a table as both % and px?

  9. #8
    Member Line's Avatar
    Join Date
    Sep 2004
    Posts
    39
    Member #
    7391
    ah percentages can be annoying. They can be good to use when doing the outter most attribute like the table tag but I wouldnt use them on td cells.

    I always use a specific size.

    As far as I know, And I could be wrong after all these years, but if you put a percentage on td cells, the percentage is the amount of space the width or height that is specified for the table tag.

    So if you put table width="900"

    and you have two tds, one is 25% and the other has no specification, the one cell marked 25% will be 225 pixels because 225 is 25% of 900.

    The percentage used for attributes in the table tag will take up percentage of the maximum space of a opened browser window. So if I don't have my browser opened at it's maximum size and let's say it's like 450 pixels in width , and i have my table width set to 100%, that means my table will only be 450 pixels (minus about 20 pixels for the scrollbar on the right and the border on the left)

    If you specificy an exact amount, than you can make sure your site always looks the same and if a user has a small screen resolution or has a un-maximized browser window, they'll see scrollbars telling them they have to scroll around to see the whole site.

    With this same info, if you made a table width 50% it would take that un-maximized browser size of 450 and make the site be 225 pixels because 50% of 450 is 225.

    One thing to keep in mind though, is that tables will always enlarge depending on what's inside them. If you make your table or td width a specific size say for example, 200, and you put a image in the table or td that is 500, your table/td will grow to cover that image.

    -Line

    -Line
    http://www.LineDetail.com | The LineDetail Drawing Co. | Theme-Based Web Site Design, Art & Animation

  10. #9
    Junior Member
    Join Date
    May 2006
    Location
    Tampa, FL
    Posts
    13
    Member #
    13287
    Quote Originally Posted by Line
    One thing to keep in mind though, is that tables will always enlarge depending on what's inside them. If you make your table or td width a specific size say for example, 200, and you put a image in the table or td that is 500, your table/td will grow to cover that image.
    Thanks, Line. This is exactly what is happening. I have a banner logo at the top of the page that is setting the width for the page. However, the image is only about 720px. I would rather have the content space in the realm of 900 to 1000 px; however, I do not want a larger image. I am wondering if I should try to place a transparent background image for the set width. Or it may be easier to cell padd on the left and right around this image. What do you think? :ermm:

  11. #10
    Member Line's Avatar
    Join Date
    Sep 2004
    Posts
    39
    Member #
    7391
    Hi Kruepdogg!

    Glad I could answer your question.

    Putting in a background will not set a width, a background in a cell or table will repeat and start from the top left corner of the table or cell and repeat. If you use CSS to place in the background you can choose whether or not the background will repeat and where it's located. However you can still not specifiy an axact size.

    BTW! Do you know about cellpadding and cellspacing? those two attributes used within the table tag also cause your tables to enlarge based on what's inside the cells and the width of your current td cells.

    -Line
    http://www.LineDetail.com | The LineDetail Drawing Co. | Theme-Based Web Site Design, Art & Animation


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:32 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com