I have an HTML DIV with 3 sections: head, body and foot.
I added 2 tabs which when clicked should change the body, foot and head. The tabs UL in the head should not change. So I think my markup is not ideal:
.window { max-width: 600px; background-color: #f0f0f0; } ul { margin: 0; list-style: none; padding: 0; } ul li { display: inline-block; margin: 0; padding: 0; } ul li a { text-decoration: none; color: white; background-color: indigo; padding: 4px; display: block; } ul.tabs { float: left; } ul.actions { float: right; } div.head { overflow: hidden; background-color: red; } div.body { background-color: green; color: white; } div.foot { background-color: orange; color: white; } <div class="window"> <div class="head"> <ul class="tabs"> <li><a href="#tab1">Tab1</a> </li> <li><a href="#tab2">Tab2</a> </li> </ul> <ul class="actions"> <li><a href="#action1">Action 1</a> </li> <li><a href="#action2">Action 2</a> </li> </ul> </div> <div class="body"> <div class="body-1">Body 1</div> <div class="body-2">Body 2</div> </div> <div class="foot"> <div class="foot-1">Foot 1</div> <div class="foot-2">Foot 2</div> </div> </div> NOTE: I still want actions on right of tabs ...
- What do you suggest for the markup?
- I will use JQuery to switch between sections.
when clicked should change the body, foot and head. The tabs UL in the head should not change, can't change the head, so only change the body and foot?