Forum Moderators: not2easy

Message Too Old, No Replies

text box with tabs in WebMD

         

zozzen

10:02 pm on Oct 19, 2007 (gmt 0)

10+ Year Member



Hi,

Completely new to CSS, I'm wondering what is the technique in the "text box" of the following page. But after viewing the code, I feel really lost....
[webmd.com...]

In the middle of the page, there's a box that shows an article under different tabs for warnings, uses, side effects, precautions.....

When I click each tab, the page won't be reloaded. All contents about the drug are actually in a single file.

The code names this section as "monographpad". Do anyone know how they make it? Which keywords should I search for this technique?

Thanks very much!

Xapti

11:19 pm on Oct 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Javascript is used to change stuff like visibility, dimensions, and position (first on load, then after each click)
This could be done solely with CSS (no javascript), but the client's mouse would always need to be hovered over the tab's contents, which is not very desireable.

zozzen

12:48 am on Oct 20, 2007 (gmt 0)

10+ Year Member



thanks a lot! I just search "javascript" and "tab" and instantly got the code. It may be called "JavaScript tabifier".