Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Oct 2008
    Posts
    185
    Thanks
    12
    Thanked 0 Times in 0 Posts

    How to place an image in the margins...

    I'm trying to place this image in the left margin of my website (see example of what it should look like here) or below:



    I would like to place the ornament graphic with the least amount of disruption to the main structure of the website. I'd simply like to lay it in or over the margin but I'm worried that I'll have to change the HTML around. It will only be a temporary (holiday) graphic...

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,671
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello jihanemo,
    Place this line anywhere in your markup - <img src="http://www.americanchic.net/website_graphics/test_ornament.png" id="orn" />

    And position that absolutely with this bit of CSS -
    Code:
    #orn {
    height: 250px;
    width: 160px;
    position: absolute;
    top: 0;
    left 0;
    z-index: 1;
    }
    #outterwrapper {
    
    overflow: hidden;
    background: #ffffff;
    -moz-box-shadow: 0px 0px 10px #bbbbbb;
    -webkit-box-shadow: 0px 0px 10px #bbbbbb;
    width: 815px;
    padding: 10px 20px 0 20px;
    margin-top: 25px;
    margin-right: auto;
    margin-left: auto;
    position: relative;
    z-index: 2;
    }
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Regular Coder
    Join Date
    Oct 2008
    Posts
    185
    Thanks
    12
    Thanked 0 Times in 0 Posts
    That's GREAT! Thank you! Will try out the code tonight.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •