PDA

View Full Version : Ajax Tabs Content Script



Seldimi
02-09-2009, 01:19 PM
1) Script Title: Ajax Tabs Content Script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm

3) Describe problem: I was trying to center div which contains the tabs and the content.. When I added on div margin auto (to get it centered) content div moved but tabs where still aligned left side of page. Any help?

ddadmin
02-09-2009, 09:03 PM
It depends on which tabs interface you're looking (based on the default ones on the script page). Tabs that are styled using float:left are generally hard to center. The first "blue shaded" tabs demo on the script page (http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm) does not use float:left, and can easily be centered by setting text-align:center inside its CSS.

Seldimi
02-17-2009, 06:05 PM
Yea.. I am using first tab (shadetabs) I managed to get the div below the tabs centered but couldnt center the tabs.. I was getting a thing like this



Tab | Tab | Tab | Tab
Content Content Content Content
Content Content Content Content
Content Content Content Content

ddadmin
02-17-2009, 06:59 PM
For "shade tabs", you should be able to center the tabs just by setting the value in red below in its CSS:


.shadetabs{
padding: 3px 0;
margin-left: 0;
margin-top: 1px;
margin-bottom: 0;
font: bold 12px Verdana;
list-style-type: none;
text-align: center; /*set to left, center, or right to align the menu as desired*/
}