SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Firefox Code Problem

    Hello,

    I have an image in a DIV that is supposed to be in middle of page.

    In Chrome/IE, it is in the right spot.

    In Firefox, it is off to the right.

    Why would Firefox have this issue?

  2. #2
    SitePoint Member
    Join Date
    Jun 2011
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you post the CSS and HTML I may be able to help you out. Are you using "text-align: center;" and "margin: 0 auto;" on the container div?

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,515
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    We need to see the css and html otherwise we are just guessing.

    Do you have a full doctype?

    Have you cleared your floats (i.e. is the image snagging on a float previous to it).

    Is the image display:block or display:inline? If its display:block then margin:auto should center it. If it's display:inline then text-align:center on the parent should center it.

    Or it could be a number of other things


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
  •