HighDots Forums  

Centre image within DIV

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Centre image within DIV in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ross Riley
 
Posts: n/a

Default Centre image within DIV - 11-11-2004 , 05:56 AM






Wondering if any of you have an idea for this problem. I've got a fixed width
div. Inside that div I need to display variable sized images. At the moment I'm
using background-position:50% 50%; This displays the image as I need centred
within the div. What I was wondering is whether you've found a way to do this
as a normal image rather than a background image. The reason I would like to
do this is for SEO reasons, I'm missing out on having lots of images, with
links and alt tags. Any Input would be appreciated. Ross


Reply With Quote
  #2  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Centre image within DIV - 11-11-2004 , 07:24 AM






Why not center the div instead of the image?

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Ross Riley" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Wondering if any of you have an idea for this problem. I've got a fixed
width
div. Inside that div I need to display variable sized images. At the
moment I'm
using background-position:50% 50%; This displays the image as I need
centred
within the div. What I was wondering is whether you've found a way to do
this
as a normal image rather than a background image. The reason I would like
to
do this is for SEO reasons, I'm missing out on having lots of images, with
links and alt tags. Any Input would be appreciated. Ross




Reply With Quote
  #3  
Old   
jrouat
 
Posts: n/a

Default Re: Centre image within DIV - 11-11-2004 , 08:54 AM



Hi,

I think you should insert <div> inside your main <div> with special id.

I made it to position images and links inside a <div>. It is cool:
you can move each small division like you want.

Reply With Quote
  #4  
Old   
Ross Riley
 
Posts: n/a

Default Re: Centre image within DIV - 11-11-2004 , 09:34 AM



Thanks for your input so far. I think i'll explain this one a little better.
I've put the dilemma at this web address......
http://therealgroup.com/examples/displayTest.html What i'm trying to do is get
the second method to look identical to the first. Hopefully this explains the
problem a little better. Thanks Ross


Reply With Quote
  #5  
Old   
David
 
Posts: n/a

Default Re: Centre image within DIV - 11-11-2004 , 11:59 AM



I see what you're trying to do there.

A down/dirty solution would be to leave the cropped image as the background,
and use a transparent gif in your image tag with a width/height set to the
outer div's values and then use it's alt tag for information about the image
beneath it as well as make it a link to the larger image.

--
David Young
Senior Web Designer
CFWebmasters.com
david (AT) cfwebmasters (DOT) com
ICQ# 1974322
"Ross Riley" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Thanks for your input so far. I think i'll explain this one a little
better.
I've put the dilemma at this web address......
http://therealgroup.com/examples/displayTest.html What i'm trying to do
is get
the second method to look identical to the first. Hopefully this explains
the
problem a little better. Thanks Ross




Reply With Quote
  #6  
Old   
Ross Riley
 
Posts: n/a

Default Re: Centre image within DIV - 11-12-2004 , 09:29 AM



Nice idea, does anyone know whether search engines will frown upon this practice?

Ross

Reply With Quote
  #7  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Centre image within DIV - 11-12-2004 , 09:32 AM



They shouldn't.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Ross Riley" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Nice idea, does anyone know whether search engines will frown upon this
practice?

Ross



Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.