css problem, the table always show below the image, not next to it

peter tong

Ranch Hand

Posts: 250

posted 8 years ago

the image has property

then there is a table

the problem is the table always show under the image, I want the table shown next to the image (on the right hand side of the image), any method using CSS? [ November 10, 2008: Message edited by: Bear Bibeault ]

Eric Pascarello

author
Rancher

Posts: 15385

6

posted 8 years ago

Image is an inline element, table is a block element.

If you want to make it appear next to it, you need to float the table.

Eric

peter tong

Ranch Hand

Posts: 250

posted 8 years ago

yes, I have float the image and the table, image float to left and table float to right, but the result is the table still under the image although it has floated to right!!