This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tab - getting little gap b/w images

 
ankur rathi
Ranch Hand
Posts: 3830
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • 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: 3830
  • 0
  • Mark post as helpful
  • send pies
  • 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 ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic