Using align attribute with img tag, does it obsoleted
Does the using of align attribute in img tag becomes obsoleted and should we migrate to another solution?
Please take care about the modern solution to give me the same effect of the following - : notice align="absmiddle"
If there is any online article about this topic, I will be appreciated too.
< h3 style = "color:red; font-weight:bold" >< img src = "images/warning.gif" alt = "Warining!" align = "absmiddle" style = "display:inline" /> Login is required !</ h3 >
According to w3schools
align in <img> is deprecated.
One option to get the same effect is to use css positioning.
Is there any tutorial or article, which is meant by discussing positioning images using css?
yes there are plenty.
If you google something like 'css positioning' you will get a truck load of references.
css positioning can be used to position jst about any element. That element can contain an image, as in your case, or just about any other content.
As a starting point, maybe have a look at the w3schools tute on css positioning.
A few months ago I posted code demonstrating how positioning works where you can enter X and Y coordinates for an element in text boxes and then watch the <div>s move accordingly.
The truck of references may get one to be lost too. The tutorial I search for, to safe time, should talks, directly, about replacing align img tag's attributes with css.
The align attribute for img tag has the following values:
There probably are tutes specifically on positioning images but since you want to save time, I would recommend googling for the many more tutes on positioning <div>s and then simply add your <img> to the <div>. With css positioning you can then remove all your <img> align attributes.
Originally Posted by
But how you go about googling is up to you.
Good Idea. However, If there is one of our friends in this community know a specific tutorial about this topic, I will be appreciated too.
Users Browsing this Thread
There are currently 1 users browsing this thread.
(0 members and 1 guests)
Tags for this Thread