By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,487 Members | 1,090 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,487 IT Pros & Developers. It's quick & easy.

Converting a .HTM file to .ASP file. Facing Table Alignment Issues

torquehero
P: 14
Hi everybody, :)

I have a regular .htm file created in Dreamweaver MX 2004. Now I want to include another htm file into it as a header. This header .htm contains the website banner and a navigation menu. I included this header.htm into another regular .htm page that contains other information about the company and saved it as .ASP. (I m saving it as .asp so that i'll be able to include this header.htm into it.) But the moment I save it as .asp, the table of the main page(in which the header.htm is included) stretches all over the screen (jst like width=100%). But, Nowhere have I mentioned the page width as 100%. NOWHERE. The main table width specified is 700pixels.

Now when I remove the included header.htm from the main page, the page width comes back to normal... thats 700pixels. I am doing this so that when I make changes to the header.htm, they will reflect in all the webpages. I will not need to go to each n every page to change the header...

PLEASE HELP... :(
Feb 14 '07 #1
Share this Question
Share on Google+
8 Replies


drhowarddrfine
Expert 5K+
P: 7,435
Without seeing the code I can only guess the header is a regular block level element, in which case it would be 100% of the width.
Feb 14 '07 #2

Tog
P: 11
Tog
hard to say without seeing the code, but if you make the .asp include file start with <table width="700"><tr><td> Your current content - and end with</td></tr></table>
This might fix the problem.

If not, post the code and you might get a more helpful reply.

regards

Tog
Feb 14 '07 #3

Frinavale
Expert Mod 5K+
P: 9,731
I'm probably just confused here but why do you need to make it an .ASP file?
Why can't you just use an iframe and load the htm header file into that?
I believe you can set the width etc of an iframe.

I could be wrong, so feel free to correct me.

-Frinny
Feb 14 '07 #4

torquehero
P: 14
Thnx, very much, all of u... Well, I have learnt website designing quite recently and therefore i am unaware of other possible easier ways to do the same stuff :) I have heard the iFrame concept but hv never really tried it out.

I had also applied shadow to the whole webpage So what I did is, I created a header.htm and a footer.htm. Then I used
--------------------------------------------------------------------------------
<body><table class="shadow" border="0"
cellspacing="0" cellpadding="0" align="center">
<tr>
<td class="shadow-topLeft"></td>
<td class="shadow-top"></td>
<td class="shadow-topRight"></td>
</tr>
<tr>
<td class="shadow-left"></td>
<td class="shadow-center">

<div><!--#include file="header.htm" -->

MAIN CONTENT OF THE WEBPAGE

</div><!--#include file="footer.htm" -->

</td>
<td class="shadow-right"></td>
</tr>
<tr>
<td class="shadow-bottomLeft"></td>
<td class="shadow-bottom"></td>
<td class="shadow-bottomRight"></td>
</tr>
</table>
</body>

--------------------------------------------------------------------------------
to include it into my page. This worked out. :)

I would like to concentrate on designing sites in CSS. What do you think?
Feb 15 '07 #5

Frinavale
Expert Mod 5K+
P: 9,731
Thnx, very much, all of u... Well, I have learnt website designing quite recently and therefore i am unaware of other possible easier ways to do the same stuff :) I have heard the iFrame concept but hv never really tried it out.

I had also applied shadow to the whole webpage So what I did is, I created a header.htm and a footer.htm. Then I used
--------------------------------------------------------------------------------
<body><table class="shadow" border="0"
cellspacing="0" cellpadding="0" align="center">
<tr>
<td class="shadow-topLeft"></td>
<td class="shadow-top"></td>
<td class="shadow-topRight"></td>
</tr>
<tr>
<td class="shadow-left"></td>
<td class="shadow-center">

<div><!--#include file="header.htm" -->

MAIN CONTENT OF THE WEBPAGE

</div><!--#include file="footer.htm" -->

</td>
<td class="shadow-right"></td>
</tr>
<tr>
<td class="shadow-bottomLeft"></td>
<td class="shadow-bottom"></td>
<td class="shadow-bottomRight"></td>
</tr>
</table>
</body>

--------------------------------------------------------------------------------
to include it into my page. This worked out. :)

I would like to concentrate on designing sites in CSS. What do you think?

I think that designing sites in CSS is a very good way to go.
I myself am just starting to realize that CSS takes time to learn so be patient with yourself.

Did you end up figuring out the iframe stuff?

The best place for resources for this kind of thing is w3c. I know there's a lot of information and it can be overwhelming but if you search the site carefully you'll even find examples on how to do things.

You'll find information in the iframe and CSS stuff too.

Cheers
-Frinny
Feb 15 '07 #6

jhardman
Expert 2.5K+
P: 3,405
It looks to me that the problem is caused by putting your header info inside the main table. I would put it in its own table, in other words start the main table after the call to include the header file, and have the header.inc have similar table definitions.

I have also seen header and footer included using javascript, but I don't know enough about that to tell you how it is done. It can definitely be done without using ASP, though.
Feb 15 '07 #7

torquehero
P: 14
I think that designing sites in CSS is a very good way to go.
I myself am just starting to realize that CSS takes time to learn so be patient with yourself.

Did you end up figuring out the iframe stuff?

The best place for resources for this kind of thing is w3c. I know there's a lot of information and it can be overwhelming but if you search the site carefully you'll even find examples on how to do things.

You'll find information in the iframe and CSS stuff too.

Cheers
-Frinny
Hey Frinny, thnx. I am sure going to take up CSS seriously. And yes, i'll be patient :) I figured out the iFrame stuff. I got it on w3c. Its pretty simple. I dont know why I opted to convert my files into ASP... I thought converting into asp was the only option. Anyways, thnx agn... hope to catch u soon...

cya
Feb 16 '07 #8

torquehero
P: 14
It looks to me that the problem is caused by putting your header info inside the main table. I would put it in its own table, in other words start the main table after the call to include the header file, and have the header.inc have similar table definitions.

I have also seen header and footer included using javascript, but I don't know enough about that to tell you how it is done. It can definitely be done without using ASP, though.
Well, the header.htm is enclosed in a div tag. <div><!--#include file="header.htm" --> and the remaining part of the page is a separate table... it worked out... :) In Header.htm I have a table and banner and a navigation menu are in two different rows... <tr> :) thanx anyways...

cya
Feb 16 '07 #9

Post your reply

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