Welcome! Log In Create A New Profile

Advanced

aligning images

Posted by Sarah Ann 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
aligning images
February 19, 2013 05:18PM
does anyone know haw to align images. I've tried

Language: HTML
<img src = "me.jpg" height = "450" width = "300" alt = "Me" align = "center">

But it doesn't seem to be working

77986725
avatar Re: aligning images
February 19, 2013 06:23PM
avatar
Mac
Re: aligning images
February 20, 2013 07:46AM
The align you are using just aligns within <image....>To align it in the center of the page you will need extra tags outside te.g. a div, a <p> or a center e.g.

Language: HTML
<div align="center"><img src="image.gif" width="637" height="44" /></div>
Re: aligning images
February 20, 2013 05:15PM
You can try it this way
Have you image in between the opening center tag & the closing center tag

<center>
<p>
<img src = "me.jpg" height = "450" width = "300">
</p>
</center>

Or leave the paragraph tag if you what to use the image only

<center>
<img src = "me.jpg" height = "450" width = "300">
</center>

Hope this will work good luck
Re: aligning images
February 26, 2013 07:49AM
I have gone with this route.for now, not Complete but its working for me.

<div align="center">

<p><img src="photo.gif" Height="550"></p>

</div>

i have seen if you test just insert the height only it keeps the picture is its aspect ratio. Was quite intresting.
Re: aligning images
February 26, 2013 12:03PM
Sorry if this sounds stupid, but this is a nightmare to me right now. What material are you guys using to learn the coding? Im having trouble just finding out how to align my student number and name..
Re: aligning images
February 26, 2013 12:18PM
Re: aligning images
February 26, 2013 12:58PM
The masterskill textbook?
avatar Re: aligning images
February 26, 2013 02:55PM
Yes Andre,

The book is split up into sections, so the page numbers start from 1 again on each section. One of the sections in the Masterskill textbook is called Cascading Style Sheet, just go to page 27 in that section hope this helps smiling smiley
avatar
Mac
Re: aligning images
February 27, 2013 11:54AM
Did you receive the Masterskils manual?
Re: aligning images
May 20, 2013 10:49AM
aligning just a single image is easily done with applyinh <center> and </center> before and after your <img></img> code.
if you want to align all images on the page i found that adding this code into the css helped a lot but then all images are unfortunately centered.
img {display: block; margin: o auto; }
Re: aligning images
May 22, 2013 08:08AM
Hi Guys

try either:
1. <div align="center"><img src="me.jpg" width="300" height="450" /></div>
or
2. <center>
<img src = "me.jpg" height = "450" width = "300">
</center>

Thanks
avatar Re: aligning images
May 25, 2013 01:32PM
I find CSS selectors use full for that plus you can do so much more than just aligning.

Language: HTML
<div id="img_container"><img src="images/example.jpg" class="main_image"></div>

and the in CSS code is as follows:

Language: CSS
div { border-radius: 5px; }   img { height: 50px; width: 80px; }   #img_container{ float: left; height: 55px; width: 85px; background-color: white; padding: 5px 5px 5px 5px; box-shadow: 5px 6px 7px #99ffcc; }

I hope this helps you. You can even use the margin property to fine tune it..
avatar Re: aligning images
May 25, 2013 01:37PM
Please ignore the :
Language: HTML
<class = "main_image">

because if you study the CSS code you will notice, I used the "img" element as the image property..tongue sticking out smiley
Sorry, only registered users may post in this forum.

Click here to login