Results 1 to 3 of 3

Thread: Making same width horizontal tabs

  1. #1
    Join Date
    Oct 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Making same width horizontal tabs

    I've seen in CSS horizontal tabs that the width of each tab depends on the length of the text within.

    How can I make same width tabs containing words of different length and each word centered inside the tab?

    Thanks


  2. #2
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    sorry don't really understand what you mean, like this?

    Code:
    <html>
    <head>
    <style>
    .tab{
    	width:100px;
    	text-align:center;
    	border:thick;
    	border-style:dotted;
    }
    
    </style>
    </head>
    
    
    <body>
    <div class="tab">
    	testing what
    </div>
    <br />
    <div style="border:thick;
    	border-style:dotted;">
    	testing
    </div><br />
    <div style="border:thick;
    	border-style:dotted;">
    	hahahahahaha
    </div><br />
        
    <div class="tab">
    what happen
    </div>    
    </body>
    </html>
    _____________________

    David Demetrius // davejob
    _____________________

  3. #3
    Join Date
    Oct 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yes! thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •