Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    Regular Coder
    Join Date
    Jan 2007
    Posts
    137
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Css Height resizing

    http://hmv.co.in/temp/html/boxes.html

    when the content of the box of either left and right boxes in the above page is diff... the boxes margin is also changed...

    how can i make both the boxes of the same siz so tht theres blank space in the box tht has less content

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,801
    Thanks
    160
    Thanked 2,216 Times in 2,203 Posts
    Blog Entries
    1
    Since the width of the columns are fixed, you can make use of http://www.alistapart.com/articles/fauxcolumns/
    Make a background having 4 lines to resemble the borders and put the two columns inside a wrapper div and put the background for your wrapper.

    Since you are using floats, add a <br style="clear:both"/> after the #rightbox just before closing your wrapper.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Regular Coder
    Join Date
    Jan 2007
    Posts
    137
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    Since the width of the columns are fixed, you can make use of http://www.alistapart.com/articles/fauxcolumns/
    Make a background having 4 lines to resemble the borders and put the two columns inside a wrapper div and put the background for your wrapper.

    Since you are using floats, add a <br style="clear:both"/> after the #rightbox just before closing your wrapper.
    u mean add <br style="clear:both"/> inside the DIv of the right box or the whole parent div...

    sir can i contact u on yahoo or gtalk instant messenger

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,801
    Thanks
    160
    Thanked 2,216 Times in 2,203 Posts
    Blog Entries
    1
    Code:
    #faux-wrapper{
    background:url(path-to-a-wide-image-having-the-design-for-border) repeat-y;
    border-top:1px solid #ccc;
    border-bottom:1px solid #ccc;
    }
    br.both{clear:both}
    /* the rest of CSS for left & right columns */
    Code:
    <div class="faux-wrapper">
      <div class="left></div>
      <div class="right></div>
    <br class="both"/>
    </div>
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    Regular Coder
    Join Date
    Jan 2007
    Posts
    137
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    Code:
    #faux-wrapper{
    background:url(path-to-a-wide-image-having-the-design-for-border) repeat-y;
    border-top:1px solid #ccc;
    border-bottom:1px solid #ccc;
    }
    br.both{clear:both}
    /* the rest of CSS for left & right columns */
    Code:
    <div class="faux-wrapper">
      <div class="left></div>
      <div class="right></div>
    <br class="both"/>
    </div>
    here am using

    border:1px solid #d8d8d8;

    for border

    how can i use this as back gorund ?



    PHP Code:
    #box {
    width:100%;
    height:100%;
    }

    #boxleft {
    float:left;
    width:46%;
    height:100%;
    border:1px solid #d8d8d8;
    padding:5px 10px 0 10px;
    }

    #boxright {
    float:right;
    width:46%;
    height:100%;
    border:1px solid #d8d8d8;
    padding:5px 10px 0 10px;

    PHP Code:
    <div id="box">
        <
    div id="boxleft">
          <
    h2>The idea behind the design</h2>
          <
    p>When it was time to redesign one of my sitesI got an idea about making one single design that all of my sites could use, and make some kind of official link network between the sitesMy way of doing this turned out to be the use of toptabs (for selecting a website) and navitabs (for selecting subsections within the different sites). With a basic PHP templateall sites could now have the same design and share the same toptabs but they can have their own separate content. If neededeach navitab can have a submenu in the sidebarwhich allows this design to handle hundreds of pages while still keeping a quick and easy navigationTo make navigation more logicaleach tab could have its own colorscheme or header image.</p>
          <
    class="block"><strong>Please note:</strongThis template is built with XHTML and CSS code onlyIt contains no CMS-specific codeIt may be customized to work with many different content management systemsbut that will require additional programming.</p>
        </
    div>
        <
    div id="boxright">
          <
    h2>The idea behind the design</h2>
          <
    p>When it was time to redesign one of my sitesI got an idea about making one single design that all of my sites could use, and make some kind of official link network between the sitesMy way of doing this turned out to be the use of toptabs (for selecting a website) and navitabs (for selecting subsections within the different sites). With a basic PHP templateall sites could now have the same design and share the same toptabs but they can have their own separate content. If neededeach navitab can have a submenu in the sidebarwhich allows this design to handle hundreds of pages while still keeping a quick and easy navigationTo make navigation more logicaleach tab could have its own colorscheme or header image.</p>
        </
    div>
      </
    div>
      <
    br clear="all" />
      <
    br clear="all" />
      <
    div id="box">
        <
    div id="boxleft">
          <
    h2>The idea behind the design</h2>
          <
    p>When it was time to redesign one of my sitesI got an idea about making one single design that all of my sites could use, and make some kind of official link network between the sitesMy way of doing this turned out to be the use of toptabs (for selecting a website) and navitabs (for selecting subsections within the different sites). With a basic PHP templateall sites could now have the same design and share the same toptabs but they can have their own separate content. If neededeach navitab can have a submenu in the sidebarwhich allows this design to handle hundreds of pages while still keeping a quick and easy navigationTo make navigation more logicaleach tab could have its own colorscheme or header image.</p>
          <
    class="block"><strong>Please note:</strongThis template is built with XHTML and CSS code onlyIt contains no CMS-specific codeIt may be customized to work with many different content management systemsbut that will require additional programming.</p>
        </
    div>
        <
    div id="boxright">
          <
    h2>The idea behind the design</h2>
          <
    p>When it was time to redesign one of my sitesI got an idea about making one single design that all of my sites could use, and make some kind of official link network between the sitesMy way of doing this turned out to be the use of toptabs (for selecting a website) and navitabs (for selecting subsections within the different sites). With a basic PHP templateall sites could now have the same design and share the same toptabs but they can have their own separate content. If neededeach navitab can have a submenu in the sidebarwhich allows this design to handle hundreds of pages while still keeping a quick and easy navigationTo make navigation more logicaleach tab could have its own colorscheme or header image.</p>
        </
    div>
      </
    div

  • #6
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,801
    Thanks
    160
    Thanked 2,216 Times in 2,203 Posts
    Blog Entries
    1
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #7
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,673
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello hmvrulz,
    Like abduraooft says, a faux column background on each .box would make each .boxright and .boxleft appear equal height.
    This would be easier than making an image:
    Code:
    .boxleft {
    float:left;
    width:46%;
    height: 420px;
    border:1px solid #d8d8d8;
    padding:5px 10px 0 10px;
    }
    
    .boxright {
    float:right;
    width:46%;
    height: 420px;
    border:1px solid #d8d8d8;
    padding:5px 10px 0 10px;
    }

    Yes, I changed your id's to classes. Check my suggestion and links about validating in my sig below.

    .
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #8
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,673
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Try this image as a background for .box repeated on the y-axis. You'll probably need to make your own image.

    Then remove the left/right borders from .boxleft and .boxright and margin your text to stay inside the background image borders.
    Attached Thumbnails Attached Thumbnails Css Height resizing-bg.jpg  
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #9
    Regular Coder
    Join Date
    Jan 2007
    Posts
    137
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Excavator View Post
    Try this image as a background for .box repeated on the y-axis. You'll probably need to make your own image.

    Then remove the left/right borders from .boxleft and .boxright and margin your text to stay inside the background image borders.
    i tried this... but i am not able to get the bottom border to the place of alignment....

    is there any way to do it....


    i found this on the web
    http://www.dynamicdrive.com/style/bl...height-script/

    it does the job for the 1st set of right n left boxes...
    but for subsequent sets it cant do it... if any one can help me modify this..am not good with java scprits...

  • #10
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,673
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hmm.
    Seems we can't get the bottom border in the right place at all, faux columns or no.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

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