HTML Table Cell: Space Between Image and Text
I have a linked image of a video and the title of the video in one cell in my HTML table. How can I put space between my image and text in that single cell? I would like the text to just have a small space between it and the image. Here is my beast mode now:
CONCAT('<div><a href="', Front End URL
,'", "target="_blank"><img src="',`thumbnail_url`,'" height="42px" style="vertical-align:middle"><span style="vertical-align:middle">', Title
,' </a></span></div>')
Best Answer
-
This works…
CONCAT('<div><a href="', 'www.yahoo.com', '", "target="_blank"><img src="','yoururl/images/jate.jpg','" height="42px" style="vertical-align:middle"><span style="vertical-align:middle;padding:0px 0px 0px 20px;">',
Title`
,'</span></a></div>')** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0
Answers
-
You can use " ", which is a forced space in html. Html ignores consecutive spaces. Or you can add padding to the style , such as "padding-right:10px;".
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
By the way, make sure you use semi colons to separate things in style. After each "vertical-align:middle", you should follow with a semi colon.
CONCAT('<div><a href="',Front End URL
,'", "target="_blank"><img src="',`thumbnail_url`,'" height="42px" style="vertical-align:middle;padding-right:10px;"><span style="vertical-align:middle">',Title
,' </a></span></div>')** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
@ArborRose I have tried the padding-right, but it doesn't work. Where does the   go?
0 -
In html " " means space. But a space that isn't ignored. So they can be strung together to make {space}{space}{space} by using . You put it anywhere you want a space character. Don't forget the semicolon.
Also, you should have the span nested inside the anchor in this order: <a href="path"><span>Title</span></a>
Based on your code, with , it would be something like this:
CONCAT('<div><a href="', Front End URL,'", "target="_blank"><img src="',`thumbnail_url`,'" height="42px" style="vertical-align:middle;"><span style="vertical-align:middle;">', [ Title],'</span></a></div>')
If the padding doesn't work on the right, try it on the left side of the title. But move your span tags to the proper placement.
CONCAT('<div><a href="', Front End URL,'", "target="_blank"><img src="',`thumbnail_url`,'" height="42px" style="vertical-align:middle;"><span style="vertical-align:middle;padding-left:10px;">', Title,'</span></a></div>')EDIT: this is wrong. See next comment.
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
Sorry…the space doesn't show in the webpage.
CONCAT('<div><a href="', Front End URL,'", "target="_blank"><img src="',`thumbnail_url`,'" height="42px" style="vertical-align:middle;"><span style="vertical-align:middle;">', ' ', `Title`,'</span></a></div>')
Oh wait…your inside of a CONCAT. Add the space as
' '
Grrr…its not letting me type it correctly. Put it in a concat string with single quote on each side, and concat it before the title.
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
Beast Mode doesn't like the syntax of the it throws an error.
Can't get the padding to do anything at all. Thank you for trying and for the help on the span order @ArborRose0 -
This works…
CONCAT('<div><a href="', 'www.yahoo.com', '", "target="_blank"><img src="','yoururl/images/jate.jpg','" height="42px" style="vertical-align:middle"><span style="vertical-align:middle;padding:0px 0px 0px 20px;">',
Title`
,'</span></a></div>')** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
That doesn't seem to paste well. Here's a screenshot. It doesn't seem to recognize padding-right or padding-left. But it does recognize padding: 0px 0px 0px 0px; where each pixel number represents in order: top, right, bottom, and left.
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
That worked! Thank you!
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive