Results 1 to 3 of 3

Thread: positioning images in Firefox

  1. #1
    Join Date
    Jun 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default positioning images in Firefox

    I have a question about the home.jpg image (top left) on this page: http://www.habibihon.com/shahrzad/

    In Firefox, it has some blank space above it that shouldn't be there, which changes the alignment with the rest of the page. It only happens when there is text in the "header" with the image.

    Here are some code bits:
    style:
    body {
    background-image: url(bg.jpg);
    background-repeat: repeat-x;;
    margin-top: 0px;
    margin-bottom: 0px;
    margin-left: 0px;
    margin-right: 0px;
    padding: 0;
    color: white;
    background-color: black;
    font-family: Verdana, Arial, Sans-Serif;
    text-align: center;
    }
    #header {
    margin-left: 0px;
    margin-top: 0px;
    padding-top: 0px;
    padding-left: 0px;
    height: 100px;
    }
    #container {
    text-align: center;
    }

    html:
    <body>
    <div id="container">
    <div id="header">
    <a href="index.html"><img src="home.jpg" align="left" alt="Home" /></a>

    <p><a href="sale.php?items=sale">Sale Items!</a></p><br />
    </header>

    Thank you in advance for any help!

  2. #2
    Join Date
    Jun 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    this should fix it,
    notice the float.
    (tested in firefox worked good)

    #header {
    float:left;
    margin-left: 0px;
    margin-top: 0px;
    padding-top: 0px;
    padding-left: 0px;
    height: 100px;
    }

    let me know how it works out

  3. #3
    Join Date
    Jul 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Similar problem

    Hi

    I'm experiencing a similar problem to the one above, I have a header image that is contained in a banner div that has margin:auto to float in the middle, I have an image set as background in the banner div and a background image set to the body element, i need these two to line up correctly. in IE i have lined them up but in FF and safari (on mac platforms) the backgrounds do not line up a margin of about 7px appears in the banner div, i notice if i apply a border to the banner div then they line upand the margin dissappears but not otherwise. I cant use float as i need the banner to have auto margins. please check the site out at www.arcolectric.co.uk/index2.html any help or guidance is much appreciated!

    - Terry

Bookmarks

Posting Permissions

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