SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    small gap underneath the banner

    i have a small gap underneath the flash banner http://tinyurl.com/ybdodnw that i need to remove, so that the banner touches the menu beaneath, how can i do this?

  2. #2
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    622
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    may be try giving negative top margin

    Code:
    #menu {
    	background:url(../images/menu.png) repeat-x;
    	height:51px; 
    	margin-bottom: 15px;
    	margin-top:-2px;
    	/*margin-top: 15px;*/
    	}
    vineet

  3. #3
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    works well thanks, i still dont understand however why this is needed, as in why the gap was there in the first place.

  4. #4
    Error 404: Life not found silver trophybronze trophy
    Join Date
    Dec 2007
    Location
    UK Nr Manchester
    Posts
    3,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's happening (probably) because Object elements are treated as inline so FF is correctly making a space under the object for text descenders. IE just ignores that cos it's crap. If you set the property for the movie to 'block' it should get rid of the gap and not be a fudge fix.
    It's 530 people, but do you really get it?
    ImgWebDesign - Web design in Buxton, High Peak, Derbyshire UK.

  5. #5
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    622
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by drtanz View Post
    works well thanks, i still dont understand however why this is needed, as in why the gap was there in the first place.
    well tried it and it worked. so i posted it.

    you can try JJMcClure suggestion also.

    vineet

  6. #6
    Design Your Site Team bronze trophy Erik J's Avatar
    Join Date
    May 2007
    Location
    Countryside, Sweden
    Posts
    3,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by drtanz
    works well thanks, i still dont understand however why this is needed, as in why the gap was there in the first place.
    You can test how the gap increases/decreases with current font-size, use the menu option to alter the text size in IE. The suggested 2px neg top margin happened to suit the default font-size.

    (The gap is then explained by JJMcClure.)
    Happy ADD/ADHD with Asperger's

  7. #7
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok do you mean set it to block via css or some other properties?

  8. #8
    Error 404: Life not found silver trophybronze trophy
    Join Date
    Dec 2007
    Location
    UK Nr Manchester
    Posts
    3,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by drtanz View Post
    ok do you mean set it to block via css or some other properties?
    Yes. {display:block;}
    It's 530 people, but do you really get it?
    ImgWebDesign - Web design in Buxton, High Peak, Derbyshire UK.

  9. #9
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok fixed cheers

  10. #10
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,280
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    If you have an image with a gap and don't want to have it get other block properties (sometimes you may want it to stay inline) then, on an inline image, you can
    img {
    vertical-align: bottom;
    }

    I do this at the top of my stylesheet esp since I don't always want/need block features in my images.

  11. #11
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,628
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    http://www.visibilityinherit.com/cod...ge-example.php

    The font-size:0 trick doesn't work in Opera, however setting line-height to 0 fixes it for Opera
    Always looking for web design/development work.
    http://www.CodeFundamentals.com


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
  •