Results 1 to 4 of 4

Thread: [vs2005] remove extra v-space inside div and fix display

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2007
    Posts
    617

    [vs2005] remove extra v-space inside div and fix display

    hi team, could someone please tell me how to remove extra list item vertical space inside div.

    are there any hacks required to display it properly in firefox?

    Code:
    <div id="panel_wrapper" style="background-color:white; width:252px;">
                <div style="background-image: url(images/block_header_bg.jpg); background-repeat: no-repeat;
                    width: 250px; height: 30px;">
                    Block 1
                </div>
                
                <div style=" padding: 0px 0px 0px 0px; background-color: white; height: 79px; width: 250px;">
                    <ol style="margin-left: 15px; list-style: none; background-color: #a5c102; width: 211px;
                        border: black solid 1px; height: 99px; display:inline-table">
                        <li>Welcome</li>
                        <li>Hits</li>
                        <li>My Recipe</li>
                    </ol>
                </div>
                
                 <div style="background-image: url(images/block_header_bg.jpg); background-repeat: no-repeat;
                    width: 250px; height: 30px;">
                    Block 2
                </div>
                
                <div style=" padding: 0px 0px 0px 0px; background-color: white; height: 79px; width: 250px;">
                    <ol style="margin-left: 15px; list-style: none; background-color: #a5c102; width: 211px;
                        border: black solid 1px; height: 99px; display:inline-table">
                        <li>Welcome</li>
                        <li>Hits</li>
                        <li>My Recipe</li>
                    </ol>
                </div>
                
            </div>

    Learn something new every .001 second.

  2. #2
    Hyperactive Member coothead's Avatar
    Join Date
    Oct 2007
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    285

    Re: [vs2005] remove extra v-space inside div and fix display

    Hi there jlbantang,

    Firefox definitely does not require any hacks to display code correctly.
    Good coding will invariably work well in the majority of browsers.
    Code:
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="language" content="english"> 
    <meta http-equiv="Content-Style-Type" content="text/css">
    
    <title>untitled document</title>
    
    <style type="text/css">
    #panel-wrapper {
        width:250px;
        background-color:#fff; 
     }
    .block {
        clear:both;
        width:240px; 
        line-height:30px;
        padding-left:10px;
        margin-bottom:1px;
        background-color:#a5c102;  /* this is for testing purposes only and should be removed */
        background-image:url(images/block_header_bg.jpg); 
        background-repeat:no-repeat;
     }
    .uls {
        float:right;
        width:211px;
        border:1px solid #000;
        padding:0 0 10px;
        margin:0 0 1px;
        list-style:none; 
        background-color:#a5c102;
     }
    .uls li {
        margin:10px 0 0 10px;
     }
    </style>
    
    </head>
    <body>
    
    <div id="panel-wrapper">
    
    <div class="block">Block 1</div>
                
    <ul class="uls">
     <li>Welcome</li>
     <li>Hits</li>
     <li>My Recipe</li>
    </ul>
               
    <div class="block">Block 2</div>
                
    <ul class="uls">
     <li>Welcome</li>
     <li>Hits</li>
     <li>My Recipe</li>
    </ul>
                
    </div><!-- end #panel-wrapper -->
    
    </body>
    </html>
    


    ~ the original bald headed old fart ~

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2007
    Posts
    617

    Re: [vs2005] remove extra v-space inside div and fix display

    hi coothead, neat code. learning from it.

    most appreciated.
    Learn something new every .001 second.

  4. #4
    Hyperactive Member coothead's Avatar
    Join Date
    Oct 2007
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    285

    Re: [vs2005] remove extra v-space inside div and fix display

    No problem, you're very welcome.


    ~ the original bald headed old fart ~

Posting Permissions

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



Click Here to Expand Forum to Full Width