waynemac Posted November 4, 2004 Posted November 4, 2004 Hi, Im wanting to center a photo in a phpwebsite block and have found that I cant by way of align="center"...it just gets ignored. So I added a <div align="center">, it works but Validator says "Dont!". Im wondering if: 1. I can use div and ahef together 2. If so what order is legal <div><a href>... or <a href><div>... Thanx. Wayne Quote
Deverill Posted November 4, 2004 Posted November 4, 2004 <div> is a "division" or a section of the page. You would want to do this: <div align="center"><a href=...> stuff </a> </div> Quote
TCH-Don Posted November 4, 2004 Posted November 4, 2004 I think the validater would prefer that you create a section in your css file to center the div as in your css file div.photo{ text-align: center; } then in your html <div class="photo" > <img src="photo.jpg" title="hi" /> </div> Then you can add to the css div.photo{ text-align: center; border: medium solid black; } to add a border, or whatever. Or you can also use in css img.photo{ text-align: center; border: medium solid black; } and the html <img class="photo" src="photo.jpg" title="photo" /> Quote
DWD Posted November 4, 2004 Posted November 4, 2004 ...so what about my method of putting <p align=center> before my images? Quote
TCH-Don Posted November 4, 2004 Posted November 4, 2004 You can check your site by going here http://validator.w3.org/checklink If you have not read up on vaidation, it can look confusing. http://validator.w3.org/docs/ may help. Quote
TCH-Bruce Posted November 4, 2004 Posted November 4, 2004 ...so what about my method of putting before my images? Perfectly acceptable. I use it this way. Quote
Deverill Posted November 4, 2004 Posted November 4, 2004 It also depends on which standards you are trying to validate for. The most strict would disallow any placement or style things from the main page. Everything from centers to fonts to colors. The more casual standard would allow most of these. Don has a great example here of how to do it the strict way. Thumbs Up Quote
waynemac Posted November 5, 2004 Author Posted November 5, 2004 All, thanx for the input. Im off to see what I can do. Great feedback from TCH people...as usual. This place rocks. Wayne Rock Sign Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.