Resize table column to fit content-html?

Hello,

I've been trying this table for days now, and it just doesn't work. I want the column with "Image" to be not as wide, but roughly the same width as the image itself.

If I make the image larger it is the same size, then I make the image smaller with width and the column remains the same width

Does anyone have any ideas? I've already tried all the chat gpt codes and nothing works. I would be very grateful.

picture attached

(1 votes)
Loading...

Similar Posts

Subscribe
Notify of
1 Answer
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
regex9
9 months ago

The width of a table column always depends on the broadest content in the respective column. This behavior can only be broken by, for example, explicitly setting the width of the column/cell in the column/table.

What happens with your shared code:

  • It is obviously a different stand than the one that can be seen on the picture.
  • In the first table cell is the last :-Day incomplete and also the HTML entity for the umlaut is incorrect (correct would be: ö – the better solution would be, however, the HTML document to specify a suitable character coding and relaud to write as usual).
  • The em-element is not used to identify headings. It emphasizes text building blocks within a text (example: “You cannot pass!”). In your case, an explanation/explanation of a text component (The Eiffel Tower), for which i-element would be suitable.

  Der Eiffelturm ist das Wahrzeichen von Paris.
  • The width-Attribute of your image has an invalid value. A number is expected without any attached unit. If you want to define the width of an image with a percentage value, you need CSS (width-Property.