473,397 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Stick to left

Hi

How can i stick tabs to left. Now it has 40px distance to left.

Expand|Select|Wrap|Line Numbers
  1. <style>
  2. #Content {
  3.             background-color: #fafafa;
  4.             border: 1px solid #a2b6cb;
  5.             padding: 10px;
  6.             margin-top: -13px;
  7.         }
  8.  
  9. UL#Tabs {
  10.             font-family: Verdana, Arial;
  11.             font-size: 12px;
  12.             font-weight: bold;
  13.             list-style-type: none;
  14.             padding-bottom: 28px;
  15.             border-bottom: 1px solid #a2b6cb;
  16.             margin-bottom: 12px;
  17.             z-index: 1;
  18.         }
  19.         #Tabs LI.Tab {
  20.             float: left;
  21.             height: 25px;
  22.             background-color: #deedfb;
  23.             margin: 2px 0px 0px 5px;
  24.             border: 1px solid #a2b6cb;
  25.         }
  26.         #Tabs LI.Tab A {
  27.             float: left;
  28.             display: block;
  29.             color: #666666;
  30.             text-decoration: none;
  31.             padding: 5px;
  32.         }
  33.         #Tabs LI.Tab A:hover {
  34.             background-color: #bfe0fe;
  35.             border-bottom: 1px solid #bfe0fe;
  36.         }
  37.         /* Selected Tab */
  38.         #Tabs LI.SelectedTab {
  39.             float: left;
  40.             height: 25px;
  41.             background-color: #fafafa;
  42.             margin: 2px 0px 0px 5px;
  43.             border-top: 1px solid #a2b6cb;
  44.             border-right: 1px solid #a2b6cb;
  45.             border-bottom: 1px solid #fafafa;
  46.             border-left: 1px solid #a2b6cb;
  47.         }
  48.         #Tabs LI.SelectedTab A {
  49.             float: left;
  50.             display: block;
  51.             color: #666666;
  52.             text-decoration: none;
  53.             padding: 5px;
  54.             cursor: default;
  55.         }
  56. </style>
  57.  
  58. <script type="text/javascript">
  59.         // Index Page
  60.         function index() {
  61.             // Tab
  62.             document.getElementById('IndexTab').className = 'SelectedTab';
  63.             document.getElementById('InstallTab').className = 'Tab';
  64.             document.getElementById('UpgradeTab').className = 'Tab';
  65.             document.getElementById('UsageTab').className = 'Tab';
  66.             // Page
  67.             document.getElementById('Index').style.display= 'block';
  68.             document.getElementById('IndexTab').className = 'SelectedTab';
  69.             document.getElementById('Install').style.display = 'none';
  70.             document.getElementById('Upgrade').style.display = 'none';
  71.             document.getElementById('Usage').style.display = 'none';
  72.         }
  73.         // Installation Page
  74.         function install() {
  75.             // Tab
  76.             document.getElementById('IndexTab').className = 'Tab';
  77.             document.getElementById('InstallTab').className = 'SelectedTab';
  78.             document.getElementById('UpgradeTab').className = 'Tab';
  79.             document.getElementById('UsageTab').className = 'Tab';
  80.             // Page
  81.             document.getElementById('Index').style.display= 'none';
  82.             document.getElementById('Install').style.display = 'block';
  83.             document.getElementById('Upgrade').style.display = 'none';
  84.             document.getElementById('Usage').style.display = 'none';
  85.         }
  86.         // Upgrade Page
  87.         function upgrade() {
  88.             // Tab
  89.             document.getElementById('IndexTab').className = 'Tab';
  90.             document.getElementById('InstallTab').className = 'Tab';
  91.             document.getElementById('UpgradeTab').className = 'SelectedTab';
  92.             document.getElementById('UpgradeTab').href = 'Tab';
  93.             document.getElementById('UsageTab').className = 'Tab';
  94.             // Page
  95.             document.getElementById('Index').style.display= 'none';
  96.             document.getElementById('Install').style.display = 'none';
  97.             document.getElementById('Upgrade').style.display = 'block';
  98.             document.getElementById('Usage').style.display = 'none';
  99.         }
  100.         // Usage Page
  101.         function usage() {
  102.             // Tab
  103.             document.getElementById('IndexTab').className = 'Tab';
  104.             document.getElementById('InstallTab').className = 'Tab';
  105.             document.getElementById('UpgradeTab').className = 'Tab';
  106.             document.getElementById('UsageTab').className = 'SelectedTab';
  107.             // Page
  108.             document.getElementById('Index').style.display= 'none';        
  109.             document.getElementById('Install').style.display = 'none';
  110.             document.getElementById('Upgrade').style.display = 'none';
  111.             document.getElementById('Usage').style.display = 'block';
  112.         }
  113. </script>
  114.  
  115. <ul id="Tabs">
  116.         <li id="UsageTab" class="Tab"><a href="#Usage" onclick="usage(); return false;" title="Usage Instructions">Usage</a></li>
  117.         <li id="UpgradeTab" class="Tab"><a href="#Upgrade" onclick="upgrade(); return false;" title="Upgrade Instructions">Upgrade</a></li>
  118.         <li id="InstallTab" class="Tab"><a href="#Installation" onclick="install(); return false;" title="Installation Instructions">Installation</a></li>
  119.         <li id="IndexTab" class="SelectedTab"><a href="#Index" onclick="index(); return false;" title="Index Instructions">Index</a></li>
  120.  
  121. </ul>
  122.  
  123. <div id="Content">
  124.     <!-- Index -->
  125.     <div id="Index">
  126.         INDEX
  127.     </div>
  128.  
  129.     <!-- Installation Instructions -->
  130.     <div id="Install" style="display: none;">
  131.         INSTALL
  132.     </div>
  133.  
  134.     <!-- Upgrade Instructions -->    
  135.     <div id="Upgrade" style="display: none;">
  136.         UPGRADE
  137.     </div>
  138.  
  139.     <!-- Usage Instructions -->    
  140.     <div id="Usage" style="display: none;">
  141.         USAGE
  142.     </div>
  143. </div>
  144.  
Attached Files
File Type: txt asdf.txt (4.5 KB, 428 views)
Oct 21 '09 #1
1 4409
Add 'padding-left: 0;' to the UL#Tabs declaration. You set padding-bottom, but never zeroed out the left.

A recommendation for the future: try setting all margins/padding to 0 and build from there, rather than trying to debug default browser behavior.
Oct 23 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Mr.Clean | last post by:
I'd like to know how to "tack" a DIV to the bottom of the browser window This would also have to observe all other content in the flow. Please see this:...
2
by: Marty | last post by:
Hi, How do we make a form "stick" to another window (something like Winamp)? I'm using C# .NET 2003. Thank you very much. Marty
2
by: ellisydjogra | last post by:
i have down loaded net framework 1.1 but i still can not get my usb2.0 menory stick to work on my computer? any idea's pls?
0
by: Stijn | last post by:
I wrote an application where the user needs an USB memory stick. When the user closes the program, some data is written to the stick. Can I write some code so my application is closing the usb...
4
by: telesphore4 | last post by:
Is there a better way to make the subclassing of built-in types stick? The goal is to have the the fields of a class behave like strings with extra methods attached. That is, I want the fact that...
10
by: John Salerno | last post by:
Is there a way to 'install' and use Python on a memory stick, just as you would on any computer? I use Windows, and I know the installation does things with the registry, so probably I couldn't use...
4
Eep˛
by: Eep˛ | last post by:
I'm trying to change the Firefox extension Scrollbar Anywhere so the mouse cursor does not move when scrolling. Here's the code but I don't know what to change: // Constants const sbawLeftButton ...
12
by: hufaunder | last post by:
I often find myself in the situation where at a customers site I have to do some quick debugging or program changes. Obvioiusly, I do not want to install VS2005 on their system. Is there a ways to...
6
by: Bobby | last post by:
Hi, I'm not 100% sure that this is an Access problem. A friend of mine has an Access 2003 database. Occasionally he brings a copy to me so that I can import some of his data into my Access 2003...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.