Whats the HTML code for align middle?
-
-
Answer:
Middle alignment in an image tag is in reference to the baseline and text around it or the alignment of an image according to the surrounding element.. The align attribute of <img> is deprecated in HTML 4.01. The image tag is an inline tag and CSS rules have to be carefully applied at times to get a non-block level tag to do what you want. Centering an element requires setting a width to the exact width of the content, using a proper document type and using the CSS property: margin: 0 auto; This is done in the CSS that styles the element. Using inline CSS rules: <img style="display: block; width: 200px; height: 200px; margin: 0 auto; border: 0;" src="Path to image" alt="Text Description"> Notice that I made the image tag a block level tag with the display rule. Otherwise, it would not have centered. Better if you used an external CSS file for your CSS rules. Ron
jayteemoney at Yahoo! Answers Visit the source
Other answers
Example: <img align="left|right|middle|top|bottom" />
Damien
just add it in a Div tag apply style in div like - <div style="text-align:center"><img src="myimage.jpg"/></div> that's it, if u attach it as background image it won't work.
k arun
Example: <img align="left|right|middle|top|bottom" />
Damien
just add it in a Div tag apply style in div like - <div style="text-align:center"><img src="myimage.jpg"/></div> that's it, if u attach it as background image it won't work.
k arun
Middle alignment in an image tag is in reference to the baseline and text around it or the alignment of an image according to the surrounding element.. The align attribute of <img> is deprecated in HTML 4.01. The image tag is an inline tag and CSS rules have to be carefully applied at times to get a non-block level tag to do what you want. Centering an element requires setting a width to the exact width of the content, using a proper document type and using the CSS property: margin: 0 auto; This is done in the CSS that styles the element. Using inline CSS rules: <img style="display: block; width: 200px; height: 200px; margin: 0 auto; border: 0;" src="Path to image" alt="Text Description"> Notice that I made the image tag a block level tag with the display rule. Otherwise, it would not have centered. Better if you used an external CSS file for your CSS rules. Ron
Shadow Knows
<... align="center" ...></...>
PCMaster
<... align="center" ...></...>
PCMaster
Related Q & A:
- How can I add a HTML code to My Yahoo homepage?Best solution by Yahoo! Answers
- What is the HTML code to make your web more accurate?Best solution by Yahoo! Answers
- How do I put an html code in a scroll box?Best solution by html.am
- What's the HTML code for a scroll box on top of a picture?Best solution by Yahoo! Answers
- Is there an html code for?Best solution by Google Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.