Wednesday, February 28, 2007

CSS Notebook Layout

Ever wanted a notebook style layout on a web page?



Well, I sure did. And I spent the better portion of the day fighting with it making it work right. You can find a small example page here.

Here are the important parts of the CSS and Javascript:

For the 'tabs':

.tab {
border-top: 1px solid black;
border-left: 1px solid black;
border-bottom: 1px solid black;
padding-top: 5px;
padding-bottom: 5px;
padding-left: 15px;
padding-right: 15px;
vertical-align: middle;
text-align: left;
color: blue;
cursor: pointer;
}


Each tab also has it's initial 'background-color' set.

Here is the corresponding HTML:

<div>
<span id="page1Tab" class="tab" onclick="showPage('page1');">
Page 1
</span>
<span id="page2Tab" class="tab" onclick="showPage('page2');">
Page 2
</span>
<span id="page3Tab" class="tab" onclick="showPage('page3');" style="border-right: 1px solid black">
Page 3
</span>
</div>


It's important to note that for the frame to properly line up with the bottom of the buttons that it needs to have it's 'margin-top' identical to the tabs 'padding-bottom'. This is what my "content" frame looks like:

div#content {
width: 95%;
border: 1px solid black;
margin-top: 5px;
background-color: #B5BBD5;
}


I'm using <fieldset> tags with <legend> tags in my example to get the neat looking frame.

Finally, here are links to the HTML, CSS, and Javascript files:

10 comments:

Anonymous said...

The demo/download link doesn't work!!

Anonymous said...

ok that's fine, i just added up many another emo backgrounds to my blog
http://www.emo-backgrounds.info

Anonymous said...

I think, that you are mistaken. I can prove it. Write to me in PM, we will communicate.

Anonymous said...

Heartburn is becoming a more common problem amongst both male and females lumigan uk online 2
This article will describe the factors involved with determining if you are a good candidate for the Maze procedure buy cymbalta cost It's more than just a feeling of being "down in the dumps" or "blue" for a few days
He has improvised the Bated Method to be a more advanced and innovative fun eye relaxation which is very easy to do viagra for women au "
When choosing any weight reduction product, we like to feel we will do a little research on that particular product by seeing if there are any user testimonials cheap iressa Most of the protein in the cream is left outside the skin and so there are no results visible
For example, you would overeat and lift heavy for 6 weeks, and then dial back the calories and increase cardio for 4 weeks Lexapro I wholeheartedly recommend that you do the same as soon as you next get the chance

Anonymous said...

- Chemical addictionThere are over 4,000 different chemicals in the smoke of tobacco leaves and among those Nicotine is known to have addictive properties lumigan cost For extra oily spots, a mild astringent may be used
The closest thing to that is the GRAS list cheap cymbalta Getting rid of your depression doesn’t necessarily mean wasting a lot of money
The primary thing to remember is, focusing on the situation and being anxious about it, will not help viagra for women You don't have to be an dietitian or a nutrition expert to get this one right
To me that's what happens with dieting iressa cost She said her new diet is working and she is on the Special K diet and is using the gym to tone up; mainly sit-ups and using the treadmill until she can hardly speak!
Cellulite lotions are specially prepared to be absorbed quickly deep into the skin where its substances can do the greatest good Buying Captopril with free dr consultation And under these rubber and latex straps, there are single padded and double padded types

Anonymous said...

We tend not to think of exercise as has having any special anti-aging effects on our skin and the way we look but it most definitely does lumigan Thus it stores more fat because it is trained to receive food only 3 times a day
When the body is under stress (infection, stress, lack of physical activity, dehydration, toxic overload) tissue swelling can result and protein accumulation in the lymph nodes occurs generic cymbalta Depressive disorders can have far reaching effects on the functioning and adjustment of young people.
A calorie shortfall will allow you to lose all of the surplus fat that is casing up the huge muscles of the stomach region Viagra for women No pain
3 gefitinib Sports that do not require too long exertion may also be good forms exercises such as swimming
It can also protect you from serious skin problems like cancer Clarinex Age spots also known as liver spots or sun spots are not welcomed marks on your skin and they usually appear on your neck, back, face and hands and are very difficult to get rid of

Anonymous said...

Wе're a group of volunteers and opening a brand new scheme in our community. Your web site offered us with valuable info to work on. You have performed an impressive task and our whole group will be thankful to you.

Check out my web blog: raspberry ketones

Anonymous said...

I pаy a visіt each daу a fеw web pagеs and sites to
reaԁ articles or reνiews, but this website offers qualіty based posts.


my homеpage :: raspberry weight loss

Anonymous said...

I'm curious to find out what blog platform you are using? I'm experiеncing some minor sесurity pгoblems wіth my latest ѕіtе and I would like to
find somеthing more secure. Do yοu hаve any suggеstions?


Also visit mу blog: sportsbet

Anonymous said...

I'm not sure exactly why but this weblog is loading very slow for me. Is anyone else having this problem or is it a issue on my end? I'll cheсk back lateг on anԁ see
if the pгοblеm ѕtill exiѕts.


Also visit my sіtе - raspberry ketones