Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,584 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,952 people online right now. Registration is fast and FREE... Join Now!




Firefox adds extra space after image

 
Reply to this topicStart new topic

Firefox adds extra space after image

sumone4life
29 Sep, 2008 - 07:11 PM
Post #1

New D.I.C Head
*

Joined: 29 Sep, 2008
Posts: 2

I am having a problem with firefox displaying a small space between the bottom of an image and a border... here is the code:

HTML:
CODE

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>Welcome to St. Paul's</title>
        
        <link rel="stylesheet" type="text/css" href="style.css" />
        
    </head>
    <body>
        <div id="bgimage" style="background-image: url(images/thanks-background.jpg);">
            <div id="content">
                <span style="font-size:15px;">Thanks, [Nickname]!</span><br><br>
                Why not take another few minues to learn more about academics, athletics, music, and dance at St. Paul's School.
                <br><br><br>
                <span id="imagearray"><a href="#"><img src="images/academics_btn.gif" /></a><a href="#"><img src="images/athletics_btn.gif" /></a><a href="#"><img src="images/music_btn.gif" /></a><a href="#"><img src="images/dance_btn.gif" /></a></span>
                <br>
                And to contact coaches and program heads ... <a href="#"><img src="images/thanks_btn.gif" style="position:relative; top:20px;"/></a>
            </div>
        </div>
    </body>
</html>


CSS:
CODE

html, body {
    background-color: #e8e6ce;
}

* {
    margin: 0; padding: 0;
}


#bgimage{
    background-repeat: no-repeat;
    height: 538px;
    width: 700px;
    margin: auto;
}

#content{
    position: relative;
    height: 275px;
    width: 435px;
    left: 25px;
    top: 235px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: bold;
}

a:visited{
    color: #9e0b0f;
    text-decoration: none;
}

a img{border:0; outline: none;}

a{
    outline: none;
}

#imagearray img{
    margin: 0;
    padding:0;
    position: relative;
}

#imagearray{
    display:inline;
    border-bottom:2px solid black;
    width: 406px;
}


Also i have attached a screenshot of the incident. It does not happen in IE.


Attached thumbnail(s)
Attached Image
User is offlineProfile CardPM
+Quote Post

sumone4life
RE: Firefox Adds Extra Space After Image
30 Sep, 2008 - 06:04 AM
Post #2

New D.I.C Head
*

Joined: 29 Sep, 2008
Posts: 2

Figure it out... i had the images in a <span> instead of a <div> doh!

Always check your spans and divs kids
User is offlineProfile CardPM
+Quote Post

gothik12
RE: Firefox Adds Extra Space After Image
1 Oct, 2008 - 10:41 AM
Post #3

D.I.C Head
Group Icon

Joined: 10 Nov, 2007
Posts: 114



Thanked: 2 times
Dream Kudos: 25
My Contributions
Yes I know, I had a big problem in showing my website in IE because I have closed improper a div tag and I couldn't be able to see it...

This is coding...we sometimes hate it but we like it biggrin.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/3/08 12:48AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month