Hi all,
I have a Table in my web site and I want to move picture on some other place of the table .
Can you tell me how to do that ?

Regards Danijel

Dani AI

Generated

Short, practical summary tied to this thread: wanted to shift an image inside a table by 300px; asked about alignment and asked for code, but the final solution was not posted. Below are maintainable, predictable ways to move one or several images inside a table cell, with pros/cons and small CSS examples.

Use margin to nudge within the normal flow (simplest)

td img.shift-right {
  margin-left: 300px;
}
  • Keeps the image in the document flow so surrounding content reflows naturally.
  • Good for single-image shifts, but a large fixed margin can break layouts on small screens.

Position absolutely inside a positioned cell (precise placement)

td { position: relative; }

td img.shift-abs {
  position: absolute;
  left: 300px;
  top: 0;
}
  • Puts the image where you want relative to the cell. Multiple absolutely positioned images need unique offsets and z-index management.
  • Absolute removes the image from flow: it can overlap other content and won’t change cell height unless you give the cell an explicit height.

Transform for GPU-accelerated, visual shifts

td img.shift-x {
  transform: translateX(300px);
  display: inline-block;
}
  • Visual move without changing layout flow. Good for animation or small visual offsets.
  • The original layout space remains where the image was, so overlaps are possible.

Practical tips: give each image a class (or use nth-child) for different offsets; prefer relative/absolute wrappers when stacking multiple images in one cell; add width/height and alt attributes to avoid layout jumps and for accessibility. Avoid using tables as layout containers for complex positioning — use Flexbox or Grid for responsive arrangements. See MDN for details on CSS positioning and transforms: position, transform, and Flexbox basics.

Recommended Answers

All 4 Replies

Do you want your picture in a different table cell? Do you want it to be right, center, left, top, middle, and/or bottom aligned? What exactly do you mean by you want to put it some other place? More info would help.

Us the different table , I mean on a Picture in the table and i want to change her position , I do not want center or top, left (only if i have to ) I want to move it for 300px right from her last position .
But I have a few Picture in One table so I want to place them in the different positions .

Clarify that please. Give a diagram and the code.

I solved problem .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.