|
CSS Home
CSS TutorialIntroductionCSS Advantages CSS Syntax Implementing CSS CSS Class CSS ID CSS Font CSS Text CSS Background Code CSS Border CSS Margin CSS Padding CSS Lists CSS Height & Width CSS Positioning CSS Float CSS Layers CSS Summary CSS CodesCSS AlignCSS bgcolor CSS Cellpadding CSS Cellspacing CSS Hyperlinks CSS Leading Inline Style Sheets Embedded Style Sheets External Style Sheets CSS Scrollbars CSS Table Width CSS Print Version CSS Table-layout CSS ExamplesCSS ExamplesCSS Table-layout Example CSS ReferenceCSS Mini TutorialCSS Properties CSS Color Codes CSS Template CSS Media Types Got a MySpace Page?Get "www.yourname.com" for your MySpace page. Learn how >>. |
CSS Table WidthEven if you use CSS exlusively to control your layouts, there may be times where an HTML table is still required (for example, to present tabular data). You can still use CSS to control the table width, borders, background and other properties. To use CSS to control the table width, use the CSS width property. For example:
If you're using an external style sheet for your css, table width can be declared there too - just call its class. For example: HTML Code:
<table class="wide-table">
CSS Code:
table.wide-table { width:100%; }
You can also use the CSS table-layout property to make larger tables load faster. For more on tables, check out the HTML Table Tutorial and the HTML Table Generator. Enjoy this website?
Oh, and thank you for supporting Quackit! |
FREE Hosting!With every domain name you register with ZappyHost, you get FREE (ad supported) hosting.PLUS you get:
Featured Template:
(Build your websites in minutes!) |