HighDots Forums  

center image

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss center image in the Macromedia Dreamweaver forum.



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

Default center image - 02-09-2009 , 05:17 AM






I would like to centre an image above my vertical naviagation bar, what is the best way to do it?

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

Default Re: center image - 02-09-2009 , 06:43 AM






It would depend entirely on the rest of the markup on your page. Please
give us a link so we can see its code.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Pengey" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I would like to centre an image above my vertical naviagation bar, what is
the best way to do it?


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

Default Re: center image - 02-09-2009 , 08:07 AM



Pengey wrote:
Quote:
I would like to centre an image above my vertical naviagation bar, what is the best way to do it?
Use css to format your image alignment. Give it a class name (eg: logo)
and use this code on your css file:

img.logo {
margin: 0 auto;
}

I agree with Murray. Show your code first and describe your problem.

Hope this helps.

--
Burman - AKA dreamworms
Web Design Tutorial: http://www.burmanweb.com


Reply With Quote
  #4  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: center image - 02-09-2009 , 08:17 AM



That will not work on any inline tag, including images. For it to work the
class rule would also have to contain "display:block", and the image would
have to have an explicit width assigned (either in the CSS or in the width
attribute). Rather than confuse the OP with suggestions that are wrong, I
suggest we take a look at the code first.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Burman" <burman (AT) burmanweb (DOT) com> wrote

Quote:
Pengey wrote:
I would like to centre an image above my vertical naviagation bar, what
is the best way to do it?

Use css to format your image alignment. Give it a class name (eg: logo)
and use this code on your css file:

img.logo {
margin: 0 auto;
}

I agree with Murray. Show your code first and describe your problem.

Hope this helps.

--
Burman - AKA dreamworms
Web Design Tutorial: http://www.burmanweb.com


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

Default Re: center image - 02-09-2009 , 09:31 AM



Thank you for replying, I've just got Dreamweaver after using ExpressionWeb so
I haven't got anything uploaded yet as I am replacing the Expressionweb site
and haven't got as far as uploading it. I'll see if I can figure out how to use
display:bock.


Reply With Quote
  #6  
Old   
Burman
 
Posts: n/a

Default Re: center image - 02-10-2009 , 12:40 AM



Murray *ACE* wrote:
Quote:
That will not work on any inline tag, including images. For it to work
the class rule would also have to contain "display:block", and the image
would have to have an explicit width assigned (either in the CSS or in
the width attribute). Rather than confuse the OP with suggestions that
are wrong, I suggest we take a look at the code first.

Why using display:block? isn't image is also block level element?
Don't make us confuse here.


--
Burman - AKA dreamworms
Web Design Tutorial: http://www.burmanweb.com


Reply With Quote
  #7  
Old   
smrdo
 
Posts: n/a

Default Re: center image - 02-10-2009 , 04:57 AM



nope, image is an inline element

Reply With Quote
  #8  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: center image - 02-10-2009 , 05:59 AM



Did you try your suggestion before making it? It doesn't work.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Burman" <burman (AT) burmanweb (DOT) com> wrote

Quote:
Murray *ACE* wrote:
That will not work on any inline tag, including images. For it to work
the class rule would also have to contain "display:block", and the image
would have to have an explicit width assigned (either in the CSS or in
the width attribute). Rather than confuse the OP with suggestions that
are wrong, I suggest we take a look at the code first.


Why using display:block? isn't image is also block level element?
Don't make us confuse here.


--
Burman - AKA dreamworms
Web Design Tutorial: http://www.burmanweb.com


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 - 2010, Jelsoft Enterprises Ltd.