0

I have container did and there are many divs inside that div.

In one of those divs I need to place 5 small icons and all of them are individual form submit buttons...

the main problem is I want all these icons in one line and in the middle of the div could someone guide me how to achieve this..

something like this http://jsfiddle.net/pJMva/60/

Thanks all efforts appreciated

koool
  • 15,157
  • 11
  • 45
  • 60

3 Answers3

1

place them in a span called "submitbuttons", then do this in css:

submitbuttons { margin: 0 auto; }

submitbuttons input { display: inline-block; }

Presuming you are using input elements of course.

Andreas Eriksson
  • 8,979
  • 8
  • 47
  • 65
  • inline-block is not supported in MSIE6 and not even completely in MSIE7. I wouldn't use that. http://www.quirksmode.org/css/display.html –  Jun 21 '11 at 08:24
  • @Andreas Carlbom http://jsfiddle.net/pJMva/61/ this doesnt work.... may be I did something wrong .... could you tell me where am I going wrong? – koool Jun 21 '11 at 08:26
  • @Omeid Herat: See: http://stackoverflow.com/questions/5838454/inline-block-doesnt-work-in-internet-explorer-7-6/5838575#5838575 – thirtydot Jun 21 '11 at 08:28
  • You weren't prefixing the ID with #, and since you are using forms, THEY need to be display: inline-block. Otherwise always results in a linebreak. Check out the this: http://jsfiddle.net/pJMva/86/ – Andreas Eriksson Jun 21 '11 at 08:33
  • @thirtydot: that is not only _display: inline-block;_ –  Jun 21 '11 at 09:47
  • @Omeid Herat: You said `"inline-block is not supported in MSIE6 and not even completely in MSIE7"`. While that statement is *strictly* true, it's *very misleading*, because it already works on `inline` elements and you can make it work on `block` elements with 2 extra lines. – thirtydot Jun 21 '11 at 09:56
1

How about something like this:

http://jsfiddle.net/ahallicks/pJMva/62/

Alex
  • 7,320
  • 1
  • 18
  • 31
  • the images are in a single line but what about centering them?? – koool Jun 21 '11 at 08:29
  • Sorry about that, didn't read the question well enough. Here you go: http://jsfiddle.net/ahallicks/pJMva/87/ – Alex Jun 21 '11 at 08:34
1

Try something similar to this: http://jsfiddle.net/dYaCw/1/ (works in IE6+)

webspy
  • 716
  • 1
  • 7
  • 20