Solved

aligning image inside table cell

Posted on 2016-10-20
4
36 Views
Last Modified: 2016-10-21
I have this fiddle

https://jsfiddle.net/edx7ma5c/

It looks like this:

my fiddle
If you notice there is a table cell with this class it has a red border on this cell <td class="colstyle2">

How do I align my chrome image on the top right of this cell.
So even if I resize the width of my browser the image always stays at the top right of this cell with the red border.

So it would look like this:
desired alignment, top right of cell with class colstyle2
0
Comment
Question by:maqskywalker
  • 2
  • 2
4 Comments
 
LVL 52

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 41853255
.colstyle2, .colstyle2 td {
  vertical-align: top;
  text-align: right;
}
.colstyle2 table {
  width: 100%;
}

Open in new window

0
 
LVL 6

Expert Comment

by:DPatel
ID: 41853260
In HTML Part do the below :

alignimage.PNG
Both the method @Julian Hansen and @D Patel will do the same task.
0
 
LVL 6

Expert Comment

by:DPatel
ID: 41853275
No Assisted Solution...
0
 
LVL 52

Expert Comment

by:Julian Hansen
ID: 41853343
@D Patel,

Your solution relies on deprecated tags -  the use of the align attribute is not supported in HTML5. You are expected to use a CSS solution instead.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now