SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: IE problems

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    Estonia
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE problems

    1) fieldset
    Fieldset background color goes over the top border in IE.

    Code:
    fieldset {
    	width: 500px;
    	background: #EFEFEF;
    	border-color: #666;
            border-style: solid;
            border-width: 1px;
    	color: #000;
    	font-weight: bold;
    	padding: 10px;
    	padding-top: 0px;
    }
    2) space under the picture
    How to get rid of the white space at the bottom of the picture (in IE)?

    Code:
    #portfell_pilt {
    	border: 1px solid #666;
    	width: 545px;
    	height: 333px;
    }

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

    IE puts the background color around the legend when its added to the fieldset. The way I get around it is to set the legend to position absolute and then move it into position.

    Something like this:

    Code:
    fieldset {
     width: 500px;
     background: #EFEFEF;
     border-color: #666;
    	border-style: solid;
    	border-width: 1px;
     color: #000;
     font-weight: bold;
     padding: 10px;
     padding-top: 30px;
     position:relative;
    }
    legend {position:absolute;left:20px;top:-10px;}
    
    The gaps in the image can be cured by closing the whitespace in the html between the closing div and the content.
    Code:
    	  <div id="portfell_pilt"> <a href="http://www.rauge.ee/paadiralli" target="_blank"><img src="http://math.ut.ee/~martin11/img/portfell/paadiralli.jpg"
    	width="545" height="333" border="0" alt="http://www.rauge.ee/paadiralli" /></a></div>
    
    Or alternatively setting that image to display:block.

    Paul


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
  •