how can i align a image to center, is it possible or not? if it is tell me how please?
Printable View
how can i align a image to center, is it possible or not? if it is tell me how please?
You can try:
or you can keep changing the v space and h space of the image until it is in the center of the page.Code:<img src="" alt="" align="middle">
or you could wrap the image in div tags than center the div and see if that works.
doesnt work.
well i found out how to:
Quote:
<HEAD>
<TITLE></TITLE>
<STYLE type="text/css">
BODY {text-align: center}
</STYLE>
<BODY>
<img src="http://www.vbforums.com/image.php?u=25658&dateline=1094028584" alt="" align="middle">
</BODY>
this aligns all BODY to center, but its possible to rename it.
Did you try the other suggestions?Quote:
Originally Posted by Justa Lol
i needed it to be center, no spaces or stuff... center of screen only.
Did that resolve your problem? If so please mark your thread "Resolved".
Hi there Justa Lol,
try it like this...
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">
#myimage {
width:64px;
height:64px;
display:block;
margin:auto;
}
</style>
</head>
<body>
<div>
<img id="myimage" src="http://www.vbforums.com/image.php?u=25658&dateline=1094028584" alt="">
</div>
</body>
</html>
i thought i hit resolved... lol... sorry.
Hi there Nightwalker83,
note that align, hspace and vspace are all deprecated attributes....
...and CSS styling should be used in their place.
Ah ok, thanks for the information!Quote:
Originally Posted by coothead
You're welcome. ;)