p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

html_code_clinic thread: creating tabs with <div> tags

Message #1 by "paul murphy" <paulmcn01@y...> on Tue, 28 Jan 2003 12:36:57
Hi Paul,

I've had a quick look and I think the problem is with this style:
.conts	{visibility:hidden}

visibility:hidden is a bit odd IMO since content tagged with this style 
still takes up the same physical space on the page, even though nothing is 
displayed, so that leaves gaps in your page.

Try changing it to display:none; instead since this causes it to take up 
no physical space on the page.  Not sure whether this is fully supported 
in older browsers.

> I have created tabs for use on a web page by using <div> tags and a bit 
j> avascript. I got the code 
f> rom "http://htmlgoodies.earthweb.com/beyond/dhtml5.html". The only 
p> roblem with this is when I try to put more stuff on my web page 
u> nderneath the tabs, there is this huge space between the bottom of my 
t> abs and the next thing I have on my web page. I think what's happening 
t> hat the browser is taking the length of all the tabs and adding it 
t> ogether and so is presuming that this amount of space is taken up. 
o> ut the url above if you don't fully understand what I mean. You can see 
i> t in that guys example. After his tabs, all his other stuff is pushed 
d> own the page.
h> elp greatly appreciated..
t> hank you very much

  Return to Index