I am having trouble align an image to "center" or "middle. I have used this code on the page:
<img src="images/logo.jpg" align="middle">
This does not work. I even made a new html file with just this code. This image shows up but on the left. What am I missing?
To do this try to use the paragraph tag even if you dont use text it will work for you
<img src="images/logo.jpg" />
margin: 0 auto;
<img id="c_enter" src="Path to image" alt="Text Description">
Another option for things like centering images, centering text, or other tasks that you may do over and over in the course of building your site is to create classes for tasks in your style sheet. That way, any time you need to "automate" a task like centering an image, just assign that class to your element.
As you design more and more sites, you'll find that you can re-use many of those classes again in your new site.... so start a collection of common classes like that, save them into a special CSS file, then you when you start a new site, just copy / paste all those common classes into your new CSS.... saves a lot of work the next time around.
Eye for Video
I think this is kind of cheating, but it works.
Originally Posted by bulbul_2005@hot
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)