Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to get box inside box effect!

Status
Not open for further replies.

JProg

Programmer
Apr 4, 2002
88
JP
Hey Everyone,

Trying to get box inside box effect using html. I have a background picture for the body of the page (e.g.: <body background="picture.jpg">) and I am using tables for page layout. The "master" top level table is using a background picture, to give the overall effect of one block inside another. The thing is my approach works in IE6 and NS7 but earlier browser versions show a gap between each of the consecutive tables (that are contained within the master table). Does anybody know of a JavaScript or approach to my task that will work in old and new browser alike?

Thanks for you help.

Regards

David
 
I have seen a lot of nested table designs and usually they work as expected. Maybe you should show us the page so we can see what the problem is. Basically, nested tables specified as <table border="0" cellspacing="0" cellpadding="0"> should have no visibly gap between them.
 

If you don't specifically specify 'cellpadding="0"' and 'cellspacing="0"' on your outer table, then the inner one will appear with a gap between it and the outer one. Tables have padding and/or spacing by default, depending on the browser used, so you need to override this.

Hope this helps,
Dan
 
Thanks Guys,

I am trying the border="0" cellpadding="0" and cellspacing="0" thing on my pages and it is working a treat. Thanks again for the assistance, really appreciated.

Regards

David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top