This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes tab - getting little gap b/w images Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "tab - getting little gap b/w images" Watch "tab - getting little gap b/w images" New topic
Author

tab - getting little gap b/w images

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Oct 11, 2004
Posts: 3830
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: tab - getting little gap b/w images
 
Similar Threads
HTML/CSS: navigation bar
Getting search results on same search page
Multiple bundles broke my app(properties file)
Using DIVs instead of Table
required fields not populating