Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26

Thread: Centre Aligning a Div

  1. #21
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    2,024
    Thanks
    16
    Thanked 315 Times in 313 Posts
    Blog Entries
    13

    Default

    In the http://www.stormdfx.com/stormdfx/ page?

    I cant see your changes in the source code - have you uploaded them?
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  2. #22
    Join Date
    Mar 2011
    Posts
    38
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Ive copied the code from the live page and I get the same error. The element ends up lower down. Does the page need to be uploaded to work properly?

  3. #23
    Join Date
    Mar 2011
    Posts
    38
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Yeah that sorted it :-)

  4. #24
    Join Date
    Mar 2011
    Posts
    38
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Hi Beverleyh,

    It seems to work in Firefox but when I view the site in Chrome, Opera and IE it goes to the bottom of the page. Please see http://www.stormdfx.com/stormdfx/

    I don't know if its viewing a cached version but it doesn't seem to work

    EDIT:

    Also now when I view your example the element is dropping down to the bottom of the screen and not floating in the centre. I'm not sure what's going on.

  5. #25
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    2,024
    Thanks
    16
    Thanked 315 Times in 313 Posts
    Blog Entries
    13

    Default

    Hmmmm, you must have changed something in your CSS file because my sample page (which is linked to the CSS/js files on your server) now no longer behaves as it did.

    When I posted the other day, it was centered in all major browsers, but now it isnt.

    Retrace your steps and if you can re-upload backups to get it back to how it was. Then make small changes til you find what caused the glitch.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  6. #26
    Join Date
    Mar 2011
    Posts
    38
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Fixed it :-)

    for some reason these 2 lines of code were missing

    Code:
    #branding {width: 100%; background: #fff;}
    #branding h1 {width: 940px; padding: 10px 15px; margin: 0 auto; text-transform: uppercase; font-size: 18px; font-weight: bold;}
    Last edited by keyboard; 11-14-2012 at 09:46 AM. Reason: Format: Code Tags [code][/code]

Similar Threads

  1. Resolved Need to get my slideshow to centre
    By Jinx13 in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 04-19-2010, 03:35 PM
  2. get window to pop up in centre??
    By liamallan in forum JavaScript
    Replies: 1
    Last Post: 03-25-2010, 03:12 AM
  3. Centre my divs??
    By llallypops in forum HTML
    Replies: 2
    Last Post: 03-11-2010, 03:13 PM
  4. How to centre align a Div
    By neilkw in forum HTML
    Replies: 5
    Last Post: 03-30-2006, 08:49 AM

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
  •