Jump to content

Image Align


Graeme

Recommended Posts

Hello,

 

Thank you.

 

I have

 

.imgholder_centre {

padding: 0px;

margin: 5px;

border: 1px dotted #;

background-color: #FFF;

float: middle;

 

and

 

.imgholder {

padding: 0px;

margin: 5px;

border: 1px dotted #;

background-color: #FFF;

float: right;

 

Thanks for your help,

 

Best wishes

Graeme

Link to comment
Share on other sites

This is the HTML you have for that section of your page:

<div id="rightbar">

	<div class="imgholder">
		<img src="[url="view-source:http://www.btinternet.com/%7Egj.d/2bfit/images/fitness.jpg"]images/fitness.jpg[/url]" width="120" height="153" alt="" />
	</div>

	<!-- <h2>latest news</h2>
	<p><span class="orangetext">March 2011</span><br />
         Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Utid anisl nec leo congue fringilla. <br />
         <br /> -->
     </div>

and in your CSS, your using #rightbar to format the content of that div. You don't need the #imgholder you have, nor the imgholder_center you don't have. (Just delete those 2 sections in your CSS and note that nothing at all happens.)

Link to comment
Share on other sites

You should always just use the minimum of division that you need - looking through your code, there are probably a few more that are redundant. In this case, if you remove the div around your image, it actually truly centers. If you need to specifically target this image, you can always and an ID or class to the img tag itself.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...