0

Hi,

I have to display content on a page.I want the content to be displayed in 800px space.So I have used a div tag.The following code explains it ...

<div style="width:800px;">

<table><tbody><tr><td border="0" valign="top" width="596">
In economics, a recession is a general slowdown in economic activity over a sustained period of time, or a business cycle contraction.During recessions, many macroeconomic indicators vary in a similar way. Production as measured by Gross Domestic Product (GDP), employment, investment spending, capacity utilization, household incomes and business profits all fall during recessions.

Governments usually respond to recessions by adopting expansionary macroeconomic policies, such as increasing money supply, increasing government spending and decreasing taxation.

</td></tr></tbody></table>
</div>

Because of the width attribute of the td tag ,content is displayed in 596px space.But i want it to be displayed in 800px space so that it covers the entire screen.
Could you please help me solve this problem..:S


Thanks in advance
Vidhi

4
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by LessZoa
0

Hi,

I have to display content on a page.I want the content to be displayed in 800px space.So I have used a div tag.The following code explains it ...

<div style="width:800px;">

<table><tbody><tr><td border="0" valign="top" width="596">
...
</td></tr></tbody></table>
</div>

Because of the width attribute of the td tag ,content is displayed in 596px space.But i want it to be displayed in 800px space so that it covers the entire screen.
Could you please help me solve this problem..:S

Should be done by just omitting the width attribute. AAMOF you could drop the other attributes also, unless they've been set to another default.

0

If you want the table to be the width of the screen, use: width: 100%; Remember that different computers have different screen widths in pixels.

0

If that is all you have in your table, I would remove the table in its entirety, and just have the content in the div. Makes for better CSS & faster read for browsers.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.