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 7 of 7
  1. #1
    Regular Coder
    Join Date
    Apr 2011
    Posts
    144
    Thanks
    3
    Thanked 1 Time in 1 Post

    how do I make my container touch the bottom

    Hey all,

    I am trying to get my container to touch the bottom of my screen, instead of there being about a 30px gap from the container and the bottom of my site. I would like it to be touch the bottom of my screen so there is no white gap between the bottom of my container and my window screen.

    Not sure if this is good, but I used a fixed size image container height of 1600px and width of 100%. Is that a bad way of putting in a container?

    Thanks,
    Jon

  • #2
    New to the CF scene
    Join Date
    May 2011
    Posts
    8
    Thanks
    1
    Thanked 1 Time in 1 Post
    I am still a student of HTML/CSS myself, but if you are using an image as the main thing inside the container and want it fixed, should you not set a pixel width as opposed to a liquid/percentage width?

    Also, you will probably get more assistance if you post your html/css. I am new here, but that seems to be the way it goes

  • #3
    Registered User
    Join Date
    Feb 2011
    Posts
    82
    Thanks
    15
    Thanked 3 Times in 3 Posts
    did you zero (reset) your script?

    Code:
    /* --RESET-- */
    a, abbr, acronym, address, applet, b, big, blockquote, button, canvas, caption, center, cite, code, 
    body, dd, del, dfn, div, dl, dt, em, embed, fieldset, font, form, h1, h2, h3, h4, h5, h6, hr, html, 
    i, iframe, img, ins, kbd, label, legend, li, menu, object, ol, p, pre, q, s, samp, small, span, 
    strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, var {
    	margin: 0;
    	padding: 0;
    	border: 0;
    }
    by default, all tags have certain "presets". from the information you provided, I think this would be the solution, however if not, then it's definetly a self-caused bug in your script.

    in order to use %, you should set your "page" width to 960px or whatever you desire. then use margin: auto.

    Code:
    html
    <body>
         <div id="page">
                <!-- Script -->
         </div>
    </body>
    
    css: 
    #page {
          /* standard margins */
         width: 960px;
          /* to center your "script" */
         margin: auto;
    you can of course use 100% as your page width, but I think for now you should probably stick to pages with a set width and margins
    Last edited by Aurora.Light; 05-16-2011 at 12:01 AM.

  • #4
    Regular Coder
    Join Date
    Apr 2011
    Posts
    144
    Thanks
    3
    Thanked 1 Time in 1 Post
    I had a fix for it, I just added a footer outside of my container and gave it the same color and had it extend to the container to the bottom of the page.

    Aurora, you just threw me for a loop. What is all that?

  • #5
    Registered User
    Join Date
    Feb 2011
    Posts
    82
    Thanks
    15
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by dazd View Post
    I had a fix for it, I just added a footer outside of my container and gave it the same color and had it extend to the container to the bottom of the page.

    Aurora, you just threw me for a loop. What is all that?
    you're supposed to reset all your tags...

  • #6
    Regular Coder
    Join Date
    Apr 2011
    Posts
    144
    Thanks
    3
    Thanked 1 Time in 1 Post
    Quote Originally Posted by Aurora.Light View Post
    you're supposed to reset all your tags...
    Can you maybe explain a little more about it to me please? Or give me a link that does, not quite sure why you have to reset tags.

    Thanks for all the help!!!
    I appreciate it,
    Jon

  • #7
    Regular Coder djh101's Avatar
    Join Date
    May 2009
    Location
    California
    Posts
    626
    Thanks
    51
    Thanked 67 Times in 67 Posts
    Filling in the space with a footer isn't really a fix, just a sloppy way to make it appear like nothing is wrong. Post a link to the page and/or your code.

    And what Aurora is saying is that you should set the margin, padding, and border of all your tags to 0 (to remove any 'default' borders or margins). I've never heard of anyone doing this, usually either the default values of attributes are used or elements are changed individually.
    "Yeah science!"


  •  

    Posting Permissions

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