www.webdeveloper.com
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2011
    Posts
    9

    Question Unwanted white space between DIVs, but no margin is set?!?

    Hello,

    I'm working on a blog (Tumblr) which should display one post after another in 100% width of the browser and with no gaps inbetween. Everything works good so far, but I keep getting small white spaces between the post-divs which I can not get rid of. I already tried setting margins and paddings to 0px, but nothing helped.

    Here the page:
    http://lakshmanasonofkaikeyi.tumblr.com/

    Here's my HTML (You can ignore the {}-brackets, they are just variables for tumblr to set what kind of post/postinformation to put):

    Code:
    <div class="post">
            
            {block:Photo}
                <div class="image">
                
                    <a class="next" href="#">        
                    <img src="{PhotoURL-500}" width="100%"/>
                    </a>
                    
                    <div class="postinfo">
                        <table width="100%">
                        <th align="left" style="padding-left: 5px;">
                            {block:Date}
                                {DayOfMonth}.{MonthNumber}.{Year}
                            {/block:Date}
                        </th>
                        
                        <th align="center">
                            {block:Caption}
                            {Caption}
                            {/block:Caption}
                        </th>
                        
                        <th align="right" style="padding-right: 5px;">
                            {block:Date}
                                {24Hour}:{Minutes}:{Seconds}
                            {/block:Date}
                        </th>
                    </table>
                    </div>
                    
                </div>
            {/block:Photo}
            
    </div>
    Here's the CSS:

    Code:
    <style>
        
            body {
                margin: 0px;
                padding: 0px;
                color: #000000;
                background: #ffffff;
                font-family: Helvetica, Arial;
            }
            
            p {
                padding: 0px;
                margin: 0px;
            }
            
            th {
                font-weight: normal;
            }
            
            .post {
                position: relative;
                width: 100%;
                margin: 0px;
            }
            
            .image {
                position: relative;
                margin: 0px;
            }
            
            .postinfo {
                position: absolute;
                top: 3px;
                width: 100%; 
                margin: 0px; 
                padding: 0px;
            }
            
            table {
                margin: 0px;
                padding: 0px;
            }
            
            .next{  
            }
        
        </style>
    Does anyone know how to get rid of those spaces?

    Thanks!

  2. #2
    Join Date
    Mar 2008
    Posts
    70
    you probably have to remove the newlines and spaces from the HTML code between the elements like:
    HTML Code:
    <a class="next" href="#"><img src="{PhotoURL-500}" width="100&#37;"/></a>

Thread Information

Users Browsing this Thread

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

     

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
HTML5 Development Center



Recent Articles