SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Feb 2003
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cutting off height from a div

    I need to know how to 'cut' a set amount of pixels off of a div. I have a navigation bar that is spanning the length of the page, and since I have it offset from the top to allow room for a header, it pushes the navbar off the bottom of the page, and causes a vertical scroll bar.

    How do I get rid of this extra height?

    If anyone could help me, I would be most grateful.

  2. #2
    SitePoint Member
    Join Date
    Feb 2003
    Location
    Ukraine, Kyiv
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try negative margin

    i.e. if your header is 100px height, navigation bar will be height: 100% and margin-top:-100px

    is that what you want?

  3. #3
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

    Re: Cutting off height from a div

    Originally posted by Jomdom
    I need to know how to 'cut' a set amount of pixels off of a div. I have a navigation bar that is spanning the length of the page, and since I have it offset from the top to allow room for a header, it pushes the navbar off the bottom of the page, and causes a vertical scroll bar.

    How do I get rid of this extra height?

    If anyone could help me, I would be most grateful.
    Look up the clip property here:
    http://www.w3schools.com/css/


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
  •