Results 1 to 5 of 5

Thread: The achcor (display:block) brings extra space in IE7?

Threaded View

  1. #1
    Join Date
    Apr 2011

    Question The achcor (display:block) brings extra space in IE7?

    Hi, I am using html5 so i guess i am able to put <div> inside the <a> (display: block). But when the <div> has float: left, it always brings extra space between <a> in IE7. Other browser works quite fine. Does anyone know any reason or solution? Thanks a lot!!

    Here is my code:
    			.block {
    				display: block;
    				background: blue;
    				width: 200px;
    				color: black;
    				overflow: hidden;
    				clear: both;
    			div {
    				line-height: 20px;
    			div.left {
    				line-height: 30px;
    				float: left;
    			div.right {
    				float: left;
    				<a href="#" class="block">
    					<div class="left">first</div>
    					<div class="right">second</div>
    				<a href="#" class="block">
    If you view the code from browser, you will be able to to see there is a gap between 'second' and 'third'. By removing the 'float: left' from 'second', the gap will be gone.

    Thanks a lot, everyone!
    Last edited by Kor; 04-06-2011 at 05:03 AM. Reason: wrap the code [code][/code]

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center