Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 02-07-2010, 12:41 PM   #1
Daemon Poster
 
Join Date: May 2009
Posts: 690
Default html help

If I use the code

<center>
<img src="photo A2.jpg" width="550" alt="" border="0" align="">
</center>

My photo does show up on the web page and is Centered.
But if I use the code


<img src="photo A2.jpg" width="550" alt="" border="0" align="">

My photo stills shows up on the web page but goes to the Left side and this is by default I gt this.

But why does this code not work

<RIGHT>
<img src="photo A2.jpg" width="550" alt="" border="0" align="">
</RIGHT>

After all the code

<center>
<img src="photo A2.jpg" width="550" alt="" border="0" align="">
</center> worked to center the photo
__________________

biferi is offline   Reply With Quote
Old 02-07-2010, 01:10 PM   #2
In Runtime
 
hockeygoalie5's Avatar
 
Join Date: Dec 2009
Location: United States
Posts: 297
Default Re: html help

I saw this somewhere before, and as I said before, <right> is not a valid tag.

I believe if you use <div align="right"><img /></div> it should work.
__________________

hockeygoalie5 is offline   Reply With Quote
Old 02-08-2010, 02:41 AM   #3
Baseband Member
 
Join Date: Sep 2008
Posts: 60
Default Re: html help

hello

use CSS to control the positions of your page elements, it is better to you

for example:

Code:
<head>
<style>
#image {
          width:640px;
          height:480px;
          background-image:url(image url goes here);
          float:right;
}
</style>
</head>
<body>
<div id="image"></div>
</body>
the last code will make your picture appear on the right side of the page - if it is empty - .


to make it apear in center replace CSS code by this:

Code:
#image {
          width:640px;
          height:480px;
          background-image:url(image url goes here);
          margin:0px auto 0px auto;
}
__________________
SAY NO TO PIRACY
Feras is offline   Reply With Quote
Old 02-08-2010, 03:18 AM   #4
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: html help

CSS is better to control the styling, however there you're putting the actual image in the CSS, which I would argue is counter intuitive. Images should only be put in the CSS if they're commonly used background images - hence the name of "background-image"!
berry120 is offline   Reply With Quote
Old 02-08-2010, 07:14 AM   #5
Beta Member
 
Join Date: Feb 2010
Posts: 1
Default Re: html help

html>
<body>

<p>An image
<img src="hackanm.gif" align="bottom" width="48" height="48" />
in the text.</p>

<p>An image
<img src="hackanm.gif" align="middle" width="48" height="48" />
in the text.</p>

<p>An image
<img src="hackanm.gif" align="top" width="48" height="48" />
in the text.</p>

<p><b>Note:</b> The bottom alignment is the default!</p>

<p>An image
<img src="hackanm.gif" width="48" height="48" />
in the text.</p>

<p><img src="hackanm.gif" width="48" height="48" />
An image before the text.</p>

<p>An image after the text.
<img src="hackanm.gif" width="48" height="48" /></p>

</body>
</html>


You just need to put your direction where you past the image. You can do it easily



Wholesale Wedding Bands
Diamond Platinum Wedding Bands
Kunegunda is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 10:22 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0