Jump to content

Recommended Posts

Posted

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

Posted

Add a text-align: center; to your #rightbar.

 

And while you have .imgholder in your CSS, there isn't one in your HTML.

 

There is no such thing as a float: middle (or center).

Posted

Thanks Andrea,

 

It's just what I want now. Incidently, I had

 

<div class="imgholder_centre">

<img src="images/fitness.jpg" width="120" height="153" alt="" />

</div>

in my HTML!

 

Best wishes

Graeme

Posted

Yes, you have imgholder_center, but that is NOT the same as imgholder. You had no imgholder (didn't look if there's one there now)

Posted

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.)

Posted

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.

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...