/    Sign up×
Community /Pin to ProfileBookmark

scrolling at definite width of table, need help

hi every1
i have a very simple request, i have a page with a table (width 90%) in it, the problem is when i resize the page to smaller part, the table get smaller too, what i want is the table be at a fixed width (say 500 for example), it can get bigger but not smaller..
any help??

to post a comment
CSS

6 Comments(s)

Copy linkTweet thisAlerts:
@ray326Feb 09.2008 — min-width?
Copy linkTweet thisAlerts:
@SZeroauthorFeb 09.2008 — details plz
Copy linkTweet thisAlerts:
@SZeroauthorFeb 09.2008 — i tried this

<TABLE Width=100% border=1 style="min-width:500px"><TR><TD>AAA</TD></TR></TABLE>

didn't work
Copy linkTweet thisAlerts:
@Frank62Feb 09.2008 — SZero,

I'll give you the code, but how about the height?

  • - Frank
  • Copy linkTweet thisAlerts:
    @SZeroauthorFeb 09.2008 — height is fine
    Copy linkTweet thisAlerts:
    @Frank62Feb 09.2008 — Here you go:
    [code=html]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>SZero's Table</title>
    <style type="text/css">
    <!--
    #tableContainer {
    width: 90%;
    min-width: 500px;}
    #SZerosTable {
    width: 100%;
    border: 1px solid black;}
    -->
    </style>
    </head>
    <body>
    <div id="tableContainer">
    <table id="SZerosTable">
    <tr>
    <td>Content</td>
    </tr>
    </table>
    </div>
    </body>
    </html>[/code]


    IE needs a wrapper (FF and Saf don't).

    Mind the first line with 'Strict'. That must stay unchanged. In the so-called quirks mode, this won't work because IE doesn't support min-width in that mode.

    Hope this helps.

  • - Frank
  • ×

    Success!

    Help @SZero spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.5,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,

    tipper: @Samric24,
    tipped: article
    amount: 1000 SATS,
    )...