473,323 Members | 1,560 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

problem with div tag

46
Hi!

I have a problem with div tag i want to increase the width of my div tag...i have two tables, one tablewhich consists of two rows and one table(using div tag) consists of many rows.Here the two tables should be displayed one under the other...it should look like same table as if there are two...check my code n tell me a solution...

Expand|Select|Wrap|Line Numbers
  1. <div id='div1' style='height:0px;position:relative'><table class='mytable' cellspacing=1 cellpadding=2 border=0 width=100px><tr bgcolor=#D4E5F7><th>a</th><th>b</th><th>c</th><th>d</th><th>e</th><th>F</th><th>g</th> </tr><tr>
how to increase width of table in div tag???????????
Aug 9 '07 #1
2 1778
Hi!

I have a problem with div tag i want to increase the width of my div tag...i have two tables, one tablewhich consists of two rows and one table(using div tag) consists of many rows.Here the two tables should be displayed one under the other...it should look like same table as if there are two...check my code n tell me a solution...

Expand|Select|Wrap|Line Numbers
  1. <div id='div1' style='height:0px;position:relative'><table class='mytable' cellspacing=1 cellpadding=2 border=0 width=100px><tr bgcolor=#D4E5F7><th>a</th><th>b</th><th>c</th><th>d</th><th>e</th><th>F</th><th>g</th> </tr><tr>
how to increase width of table in div tag???????????

first of all
in div id='div1' in that what u write i don't no.

second:::
once you mentioned the width of div tag it should be fixed.

example:
Expand|Select|Wrap|Line Numbers
  1. <style type="text/css">
  2. div.setwidth { 
  3. width: 860px; 
  4. background-color:red;
  5. </style>
in that table width you can give 100% or exact 860px.
other wise div width will be increase along with the table width. ( if table width>860px )

i pasted here some code just you check it.

[HTML]
<html>
<head>
<style type="text/css">

div.setwidth {
width: 860px;
background-color:red;
}
</style>
</head>

<body>
<div class="setwidth">
<table width="600" cellspacing="0" cellpadding="0" bgcolor="#CCCCCC">
<tr>
<td>abcd</td>
</tr>
<tr>
<td><div>this</div></td>
</tr>
<tr>
<td>ijkl</td>
</tr>
</table>
<table width="600" cellspacing="0" cellpadding="0" bgcolor="#000" style="color:#ffffff; ">
<tr>
<td>123</td>
</tr>
<tr>
<td>456</td>
</tr>
<tr>
<td>789</td>
</tr><tr>
<td>012</td>
</tr>
</table>
</div>

</body>
</html>
[/HTML]
please paste here exact code then i will give you clear information.

thank you,
chandu.majeti
web developer.
Aug 9 '07 #2
honey99
46
plz check this code once

[HTML]<div id='div1' style='height:0px;position:relative;'>
<table class='mytable'cellspacing=1 cellpadding=2 border=0 width=100px><tr bgcolor=#D4E5F7>
<th>S</th><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th> </tr>;
[/HTML]

document.getElementById("div1").innerHTML=render;
Aug 9 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

117
by: Peter Olcott | last post by:
www.halting-problem.com
28
by: Jon Davis | last post by:
If I have a class with a virtual method, and a child class that overrides the virtual method, and then I create an instance of the child class AS A base class... BaseClass bc = new ChildClass();...
6
by: Ammar | last post by:
Dear All, I'm facing a small problem. I have a portal web site, that contains articles, for each article, the end user can send a comment about the article. The problem is: I the comment length...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
2
by: Mike Collins | last post by:
I cannot get the correct drop down list value from a drop down I have on my web form. I get the initial value that was loaded in the list. It was asked by someone else what the autopostback was...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.