Results 1 to 3 of 3

Thread: Header is escaping from "div" container.

  1. #1
    Join Date
    Jul 2011
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Header is escaping from "div" container.

    Hi all,
    I am having little trouble here with my website "Header". I assume it is related to margin-top. And it is happening only with firefox. In IE9 and google chorme it works fine.Here is my test website http://www.dublinawamileague.net46.n...committee.html . Please view this with "Firefox" then you can find wheres the problem is ? This website header is escaping from the containg div. I tried to fix that with giving
    HTML Code:
    <div margin-top: -15px>
    after the <body> but it didnt work.

    On the top of this page in element selector I also tried to balance this with
    HTML Code:
    /* ~~ Element/tag selectors ~~ */
    
    h1, h2, h3, h4, h5, h6, p {
    	margin-top: 0;	 /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
    	padding-right: 15px;
    	padding-left: 15px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
    }
    . But it didnt work too.Is there any way that I can fix this. I have few pages in this website that I gotta fix for "Firefox" viewer. Can you please help.

    Thanks & Regards,
    Alak

  2. #2
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,396
    Thanks
    32
    Thanked 153 Times in 147 Posts
    Blog Entries
    34

    Default

    I remember a similar question was asked not long ago. The trick was to put<br> before the escaping element.
    In your case, try to put <br> before <div class="container" ....
    (Firefox sometimes treats divs as inline elements that are seen as block elements by other browsers).
    Arie Molendijk.
    Last edited by molendijk; 10-10-2012 at 08:27 PM. Reason: Adding a line

  3. #3
    Join Date
    Jul 2011
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks Molen, Yes, it has been asked before but that was sorted out without given any <br>. It was margin-top-15px. So I was thinking there might be less or more points need to be added with that may be -20px or -10 px. But the above error has been sorted out with <br>. Thanks again.

Similar Threads

  1. Replies: 0
    Last Post: 04-11-2009, 09:48 AM
  2. Combining "Local Time Script" with "Cool DHTML Tooltip"
    By thr33swords in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 08-22-2008, 08:52 PM
  3. Replies: 1
    Last Post: 08-19-2008, 02:36 AM
  4. Replies: 3
    Last Post: 08-06-2008, 03:17 AM
  5. header ("Location:", TIME)
    By JAB Creations in forum PHP
    Replies: 8
    Last Post: 03-20-2008, 07:13 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
  •