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.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 738 Beast Mode
- 56 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 123 Manage
- 120 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive