• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

tab - getting little gap b/w images

 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am developing a typical tab functionality.

Here is the code:



But it looks like this:


One shows a border around the tab, div displays tab text in it's own line and third one has little vertical gap in three images.

How can I have image - background - image consecutive.

Thanks.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well tables are horrible for what you are doing. CSS with lists is better: http://css.maxdesign.com.au/listamatic/horizontal05.htm

If you want to do what you are doing, you need to look into float, padding, margins.

Eric
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Eric Pascarello:
Well tables are horrible for what you are doing. CSS with lists is better: http://css.maxdesign.com.au/listamatic/horizontal05.htm

If you want to do what you are doing, you need to look into float, padding, margins.

Eric



Thanks Eric.

Why tables are horrible for this?

Even if I use lists, I come to the same point - showing image-background-image consecutively.



Can't I apply background just to a label? like here on 'B Tab'?

If I keep this 'B Tab' in some place holder where I can apply background, I get little vertical gap there...

I read about float, padding and margins but couldn't figure out how they can help here.
[ September 17, 2008: Message edited by: ankur rathi ]
 
This is my favorite tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic