Image not centering on the page

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.

  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;

Image not centering on the page

Postby rudy » Tue Jul 17, 2012 4:08 pm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title></title>
</head>

<body>
<img src="C:/Documents and Settings/Larry/My Documents/images/200px-USB_Icon.svg.png" width="200" height="96" align="middle" border="0" alt="welcome" />
</body>

</html>

When using the code generated by your product as shown above, and I click to preview, the image is on the left of the page - thought it would be centered in the middle of the page and also the alt text does not show up when the image is moused over. What am I missing? Using IE to preview.

When I preview it in FireFox, the image doesn't show at all but the alt tage "welcome" shows up and it is aligned left on the page.
User avatar
rudy
 
Posts: 3
Joined: Mon Jul 16, 2012 6:01 pm

Re: Image not centering on the page

Postby Aivars » Tue Jul 17, 2012 9:15 pm

Align centers image according to surrounding text, align=middle aligns text line with middle of image (vertically). Read this: http://www.htmlcodetutorial.com/images/_IMG_ALIGN.html

Regarding Alt, read this: http://www.searchenginejournal.com/imag ... ence/6930/

Read this on centering images: http://webdesign.about.com/od/beginning ... 012207.htm
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2337
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Image not centering on the page

Postby Aivars » Tue Jul 17, 2012 9:19 pm

To make sure the local images (from your computer) are displayed in all browsers, add file:/// in front of image path, <img src="file:///C:/Documents and ... - however note that this will not work once you upload your page online.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2337
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Image not centering on the page

Postby pety » Fri Mar 08, 2019 3:36 pm

Put image into a praragraph:
Code: Select all
<p>
    <img src="/pat/to/image.jpg" width="200" height="96" align="middle" border="0" alt="welcome" />
</p>
pety
 
Posts: 172
Joined: Fri Mar 02, 2012 7:17 pm


Return to HTMLPad / Rapid CSS / Rapid PHP / WeBuilder Support

Who is online

Users browsing this forum: No registered users and 3 guests