How do I center an image inside a CSS div tag using dreamweaver?

I know this may seem like a very silly queston to ask because it should seem so simple but how do I do that? I am having trouble being able to center an image inside of a div tag. Here is the code I have come up with so far. Thanks in advance for your help.
</style>
</head>
<body>
<div id="PageContainer">
  <div id="PageHeader"> img.centered{display:block; margin-left:auto; margin-right:auto; }<img src="Untitled-5.jpg" alt="rowland" class="centered" /></div>
<div id="PageMenu">Content for  id "PageHeader" Goes Here</div>
<div id="PageBody">Content for  id "PageHeader" Goes Here</div>
<div id="PageFooter">Content for  id "PageHeader" Goes Here</div>
</body>
</html>
Also you can ignore the other div tags after the first div id. The first div id that has my image link is the one I am trying to get to center my image. The image is in there just not centering.

Centering Pages, Images and other elements with CSS:
http://cookbooks.adobe.com/post_Centering_web_pages_and_other_elements_with_CSS-16640.html
Nancy O.

Similar Messages

  • How do I center an image inside a div tag using fluid grid layout?

    where do I find and what do i use the image properties position when using the fluid grid layout. I'd like to center the image in the mobile page versus th left position in the desktop.

    This is what my css codes looks like where the image is in the div tag:
    #logo_links {
        clear: both;
        float: left;
        margin-left: 0;
        width: 32.2033%;
        display: block;
    This is the html code where the image is:
      </div>
        <div id="logo_links">
          <div align="center">
            <p><img src="../fluidgrid/images/3_7x2logo.jpg" alt="" width="236" height="110" align="left"></p>
          </div>
        </div>
    I'm going to need more detail where to insert the suggested code as I am a newby!
    Thanks

  • Upgarded to PE 13 - How do I drag an image from one screen to another (using 2 monitors)

    upgarded to PE 13 - How do I drag an image from one screen to another (using 2 monitors)

    upgarded to PE 13 - How do I drag an image from one screen to another (using 2 monitors)

  • How can I make an image placed in the body tag expand to the entire width of the browser?

    How can I make an image placed in the body tag expand to the entire width of the browser?I

    background-repeat -- best used with small image tiles.
    background-gradient  - Ultimate CSS Gradient Generator - ColorZilla.com
    background-size:cover - Resizable Full Page Background Image
    Nancy O.

  • Image Map in a div tag causing problems in webpage

    I have an image map in a div tag (I'm using Dreamweaver so
    I've place hot spots on a gif within a div tag). When I preview in
    a browser the hot spots are creating an empty space between the
    image and the div tag below it, which there shouldn't be. Prior to
    this I had done the same thing but using layers instead of div tags
    and it was fine... there was no unwanted space. What am I doing
    wrong?

    Hi lauren,
    I tried to replicate the above mentioned issue, but did not get the <div> around the image in Webhelp output. Would it be possible for you to provide more information on this:
    At what point does the <div> start appearing around the image, as soon as the CBT expression is applied?
    If yes, what is the expression?
    What happens when expression is set to None again and individual CBT is under application
    Is there a spacing or the CBT text just follows the inline image?
    Please send us a sample file for the same, if possible. Thanks!
    Amit

  • How do I center the image created in my pdf files?

    When I create a pdf file from a windows application and the image has a border around it. Then open the file to view it, the border appears to be shoved to the lower left corner of the opened pdf file image so instead of having a 1/4" border around the page, the border is 0 on the left side and bottom, and 1/2" on the right side and top. It prints this way also. How can I make Acrobat 8 Standard center my image so the border is the same all the way around? The border is all the way around in the application the document is created in, and when printed from the application it is correct all the way around, but the pdf file is not.

    Terry
    In your windows application, if you can click "center horizontally" and "center vertically" do that. I'm not sure what windows application you're using, but this happens to me when I use Microsoft Office programs.

  • How can I center the chart inside the portlet?

    Hi,
    I created a bar chart and published it as a portlet.
    The chart is left-positioned inside the portlet which doesn't
    look good. How can I center it?
    Thank you in advance for your help.

    Hi,
    There is no way of centering your chart within a portlet.
    Thanks,
    Anu

  • How do you position an image inside a photo box?

    I'm trying to create a 20 page 16x8 book and I cannot figure out how, after putting a photo box on the page, and dropping an image into it, how do I move the image around inside of it. For instance if I create a square photo box, how do I position a 3:2 image inside of it?

    Double click it.
    RB

  • How do you center an image within a PDF?

    How do you center align an image in a pdf?
    Thank you.

    Hi drewdollar,
    If you have Acrobat, you can use the Edit Text & Images tool on the Content Editing pane of the Tools panel. Just select Edit Text & Images, and then drag the image where you'd like it to appear on the page.
    Best,
    Sara

  • How can i postition an image inside a div correctly?

    I am learning CSS and I want to insert an image inside a div
    used as a footer. I want the image to appear to the left of the div
    with say 10px left margin and 5px top and bottom.
    I also have a horizontal UL and a <p> inside the div
    which are set to the centre. I want to keep their appearance as
    they are - but add the image to the left without putting anything
    else out of place if that makes sense.
    Can someone show me how it is done?
    http://www.tomkilbourn.com/newsite/test/footer.html
    The image which I want to use is from validator.wc3.org -
    <p>
    <a href="
    http://validator.w3.org/check?uri=referer"><img
    src="
    http://www.w3.org/Icons/valid-xhtml10"
    alt="Valid XHTML 1.0 Transitional" height="31" width="88"
    /></a>
    </p>

    ~Billy~ wrote:
    > Ive got it to work by adding -
    >
    > <span
    style="position:absolute;top:27px;left:20px;">
    > <img src="/newsite/images/valid-xhtml10.png"
    /></span>
    >
    > before the closing body tag, but is there a way to do it
    without using
    > absolute positioning and span?
    >
    Id' do it by adding position relative to my footer div and
    then I'd
    create a class for the img and use absolute positioning for
    it which if
    nested within the footer div will be relative to that - like
    so.....
    in your css...
    #footer {
    border-top: 1px solid rgb(187, 187, 187);
    padding: 0px 0px 10px;
    background-color: rgb(51, 0, 0);
    position: relative;
    .w3c {
    position: absolute;
    top: 10px;
    right: 20px;
    and your html markup for your footer dive, something like....
    <div id="footer">
    <img src="/newsite/images/valid-xhtml10.png" alt="alt text
    here"
    class="w3c" />
    <ul id="navlist">
    <li><a href="#">Item one</a></li>
    <li><a href="#">Item two</a></li>
    <li><a href="#">Item three</a></li>
    <li><a href="#">Item four</a></li>
    <li class="last"><a href="#">Item
    five</a></li>
    </ul>
    <p id="footerbottom">Copyright Tom Kilbourn 2007
    www.tomkilbourn.com</p>
    </div>
    chin chin
    Sinclair

  • How do I center a container div tag in Dreamweaver?

    Hi,
    I actually asked this question about another web page but for some reason setting the margins to "auto" on this one isn't working.
    Please help. Thank you.
    http://www.laurasummers.com/

    Thanks Nancy. I appreciate this. I do have another question, though. I did try to adjust the margins in my Dreamweaver body style sheet and it didn't seem to work. Do you know why this is?
    Also, I did add this code. It worked except that the "Laura Lee Summers" and the subtle wave imagery stay in place while everything else centers. The Laura Lee Summer and the wave image is in the container div tag so I am confused.
    Try this:
    body {
    width: 960px;
    position: relative;
    margin: 0 auto; /**this centers the page on screen**/
    background: #cdffff url(lsummers_images/laurasummers_bkgd_Final.jpg) top center no-repeat;
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
    font-size: 14px;
    color: #111;
    line-height: 1.5;
    NOTE #1: font-size in points (pt) is for print only. For web pages displayed on screens, use px, ems or %.
    NOTE #2:  The site owner's name is the most important piece of information on the page, right?  It belongs inside the markup within <h1> tags.  Instead, you have put her name in a background image which will never be recognized by Google.
    SEO LINKS
    Google's SEO Starter Guide Updated 2010
    http://googlewebmastercentral.blogspot.com/2010/09/seo-starter-guide-updated.html
    High  Rankings Advisor
    http://www.highrankings.com/newsletter/
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • How to delete a DAC block inside a sub-block by using script?

    Hello,
    how can I delete a DAC block that’s inside a sub-block diagram using a script?
    The command
    call SCHEMELOAD("xxx")
    call BlDel("yyy")
    only deletes blocks that are in the highest level of the actually loaded block diagram, not blocks that are in a sub-block diagram. (DIAdem 2012)
    regards,
    Eric

    Hi Walter,
    I don't need to delete a sub-block, I'd only like to delete blocks which are placed inside a sub-block.
    All other commands I tried work for blocks no matter where they are inside a block diagram. For exaple: You can put a math formula block inside a sub-block wich is inside a sub-block which is inside a sub block and it does change the formula by script command.
    But when using the command Bldel it deletes all blocks but not the ones inside a sub-block.
    regards, Eric

  • How do I split 1 image across 2 pages? Am using Pages `08.

    When formatting a magazine - how do I split one image across 2 pages side by side?

    You can't with a single image, but you can "fake" it. Duplicate the image & then line up the two halves. It's easier if you are viewing facing pages two-up.

  • How can I make an image tile length of browser without using it as background image?

    I understand that if you use the rectangle tool and stretch it to the edge of the page, triggerring the red margin, the tiled image is supposed to stretch the length of the browser. Although this works for width, tiling horizontally, for some reason, it doesn't work for length, tiling vertically. When I preview my work in browser, the tiled image doesn't extend along with the footer as I scroll down the page.
    When I use the image as background fill and tile it, then it works, but I need to use a different image for the background.

    Hi
    As you have mentioned you can either use browser fill with tile fitting or design the browser background image outside of Muse using any image editor like Photoshop and then use as browser fill which would include both images the one you want to use as background image and the one that you want to use as Tile on page section.
    Thanks,
    Sanjit

  • How do i center a div tag using css?

    I am trying to learn css layout.
    Starting with a blank page, I insert a couple of AP div tags and locate them where i want.
    When i preveiw them in a browser, i notice that they are left justified. This is what i expect as they are Absolute positioned.
    I would like them to be centered as a group. Creating a layout and centerring it on the browser window seems like a basic task.
    I tried to add a div tag wrapper and center that but i cannot find where in the css panel is there any reference to center.
    seems simple enough, im stumped.
    Thanks
    Jerry
    P.S. I know as soon as i post this, i'll find the answer.

    >>I tried to add a div tag wrapper and center that but i cannot find where in the css panel is there any reference to center.
    Yeah that is the right approach and you can center by using following style:
    #wrapper{
    margin:0 auto;
    Your ap divs will then absolutely position themselves within this wrapper div which acts as parent.
    Regards,
    Vinay

Maybe you are looking for

  • Images exported from iPhoto 6 cannot be inserted into Word:Mac OSX document

    I recently bought a new camera (Nikon D90). I have no problem importing the photos into iPhoto 6 as jpgs, but I am unable to insert the photos (in jpg format) into Word OSX documents. I get a message that says "This application cannot open this file.

  • PSB- Worksheet cannot send for Approval

    Dear All, We are implementing Public Sector Budgeting module. When we create an worksheet and try to submit for the approval the submit worksheet is disabled. and if any one can differentiate wat is the difference between global worksheet and local w

  • SAP does not start-gives error message

    This error has just started. When I click the SAP icon, it does not start and it gives the error message E - SAP - SAP Business One - SAP Business One The color palette file couldn't be properly loaded Thanks

  • Elements won't let me start music at beginning of clips

    i am trying to make a slide show consisting of freeze frames. i want it to have music, so I added my music but pr.elements puts it about 7 seconds after the beginning of the clips. so there's 7 seconds of silence before the music starts. but when I t

  • Can't update, can't use InDesign6

    I can no longer get my computer to use InDesign 6.  When I start up, a box comes up indicating that Windows has detected a problem and is closing InDesign.  I have tried re-installing and then updating/downloading updates, but the updates won't load.