Data Recovery Forums - Help & Discussions Forum Index

Data Backup Software, Program | Solution, Computer | System Backup Software
Data Recovery Forums - Help & Discussions
Free online data recovery guide to help you find the information you need to recover your data. Discuss and get help about data recovery in this forum.
Professional Data Recovery | Data Recovery Houston | Data Recovery Chicago | Data Recovery New York | Data Recovery Boston | Data Recovery Los Angeles

 FAQsFAQs   SearchSearch   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Windows Data Recovery Software | Tool | Program | Utilities | Applications, NTFS Deleted File Recovery, FAT Undelete
Some Elements Center, Others Don't!

 
Post new topic   Reply to topic    Data Recovery Forums - Help & Discussions Forum Index -> Styling & Designing


 
Author Message
Isabella



Joined: 15 Jun 2006
Posts: 103

PostPosted: Fri Aug 11, 2006 11:44 pm    Post subject: Some Elements Center, Others Don't! Reply with quote

First, remember that the ALIGN attribute is a deprecated HTML attribute, meaning it's marked for deletion in future versions. Of course, deprecated doesn't mean that it will stop working tomorrow or even next year. But it does mean that you should be alert to display issues in current and future browser versions.

Since ALIGN may not behave as you expect, how should you center an image?
Your first thought is probably to include the align="center" property/value pair to your image tag. After all, it works for paragraphs, tables, and other elements:

Code:
<p align="center">paragraph content here</p>
<table align="center">table content here</table>
<div align="center">div content here</div>
<h2 align="center">header content here</h2>


The content inside those tags centers reliably across browsers because they're block-level tags. But the IMG tag is an inline element, so it displays relative to the content around it. That's why the only supported ALIGN values are those that indicate how text and other page elements should display in relation to the image.

Quote:
You can move an image to the left or right on the Web page or control its vertical placement with the ALIGN property, but you can't center it using the ALIGN attribute. align="center" isn't valid HTML. All browsers ignore align="center" when it's part of an IMG tag.



Via Larisa

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Data Recovery Forums - Help & Discussions Forum Index -> Styling & Designing All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Data Recovery Service | Data Recovery London UK | Houston Data Recovery | Chicago Data Recovery | New York Data Recovery

Powered by phpBB © 2001, 2005 phpBB Group