SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    815
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    two links side-by-side not working b/c of display:block

    I have two links, they have to be side by side, but they also have to be display:block b/c they have bg images... they're not falling side-by-side, even though have margin:0 & padding:0 for both of them..

    (actually, one of them is a link, other one is an input type="image")

    Code:
    <div id="buttons">
    	<a href="" id="surveyOverlayCancel">cancel</a>&nbsp;&nbsp;
    	<input type="image" id="surveyOverlaySubmit" class="submitBtn" src="images/btn_submit_survey_overlay.jpg" value="submit" alt="submit" />
    </div>
    Code:
    #surveyOverlaySubmit { margin:0; padding:0;  } 
    a#surveyOverlayCancel { display:block; margin:0;  padding:0; background:url('../images/btn_cancel_survey_overlay.jpg') no-repeat; 
    			width:82px; height:32px; text-indent:-9999px;  }
    would appreciate some suggestions.. thank you..

  2. #2
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    display:block defeats the side by side.
    display: inline-block doesn't

  3. #3
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    815
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    hmm.. thank you very much.. ended up positioning them..

    ;-)

  4. #4
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,598
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    If supporting FF2 you will need display:-moz-inline-box; in there as well becuase FF2 doesn't support inline-block without it.

    You could have also floated by the way
    Always looking for web design/development work. Willing to do it cheap to build portfolio!


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
  •