Soham Dasgupta
Soham Dasgupta

Reputation: 5199

HTML table td alignment

I have three buttons inside a td element. Now all the buttons are being aligned vertically. How can I align them horizontally without using nested table.

Upvotes: 0

Views: 263

Answers (3)

Salil
Salil

Reputation: 47532

use div with property float left

<div style="float:left">
  button1
</div>

<div style="float:left">
  button2
</div>

<div style="float:left">
  button3
</div>

Upvotes: 1

Narcis Radu
Narcis Radu

Reputation: 2547

Use CSS:

float:left for every button clear: both in the end

Upvotes: 1

Marc Andreson
Marc Andreson

Reputation: 3495

Try using unordered list (UL) of list elements (LI) with horizontal alignment.

Here is an example: http://css.maxdesign.com.au/listamatic/horizontal01.htm

Upvotes: 1

Related Questions