SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Looking for a bit of help here

    Hey all,

    I'm trying to make a bit of a template sort of thing for a project at school, but I've run into something and I can't think of how to do it. Here is what I have so far

    http://djclan.auscstrike.com/template2/

    As you can see in the link, there is a bit of a bar at the top and bottom, and the content goes in the middle, in the big white space. What I'd like is to have the content take up the entire white space in the middle, but I don't want to specify pixel heights because I'm on 1280x1024 but I can't be sure what resolution the computer I'll be presenting on will be running.

    Any ideas?

    Thanks

    Edit:


    I know the XML declaration stuffs with IE but I specifically want it there even though I'll be presenting this page in IE.

    Edit:


    Also, in Opera and Firebird, it looks okay the way it is but in IE, the text isn't visible


  2. #2
    SitePoint Addict
    Join Date
    Mar 2002
    Posts
    327
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The page appears to be blank (at least it does in MOzilla). You can specify percentages instead of px the same as you can in tables. Hope this helps.

    Nick
    All4YourPC for all your PC needs. Custom software.
    Websites. Web marketing. Training.
    http://members.aol.com/nickjc67

  3. #3
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Which version of Moz? Looks fine to me in Firebird.

    I know you can specify in percentages, it's just the the top and bottom bar are images so their height is in pixels.

  4. #4
    Rabble Rouser bronze trophy
    Join Date
    Jan 2003
    Location
    Mountain View, CA
    Posts
    427
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In div.content you can change the margin to "margin: 0px auto;" and put the 10% in for padding-top and padding-bottom. Though it would seem to make more sense to use the px values you have for the top and bottom bars.

  5. #5
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,513
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Also, in Opera and Firebird, it looks okay the way it is but in IE, the text isn't visible
    The text doesn't show in Mozilla 1.2 either. Move your style div.top out of the container div and place at the end of the code after the closing div for container.

    e.g.
    Code:
    </div>
    <div class='top'>&nbsp;</div> 
    </body>
    Now it should display in Ie6 and Mozilla.

    I've noticed that if you place absolutely placed elements before the normal flow elements there are occasional problems in IE and moz (even though there shouldn't be any difference as the element is removed from the flow). The solution is to place your abs elements last in the html code. As they are absolutely placed then this should be no problem. (Unless you are nesting elements that have a stacking context (eg the parent has a property for position other than static) and then place the elements lower down in that context.)

    Paul

  6. #6
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Paul_C
    In div.content you can change the margin to "margin: 0px auto;" and put the 10% in for padding-top and padding-bottom. Though it would seem to make more sense to use the px values you have for the top and bottom bars.
    Duh!

    I can't believe I didn't think of that! Thanks heaps, works almost exactly as I was looking for. The only thing I want now, is if you visit the URL again, it's been updated so you can see. I want to have overflow on scrollbars, and I want them there even if the content is within the boundaries of the layer. That's easy enough to do, but the scroll bars only stretch the length of the text, even though I have the height set to 100% (minus the margins, which I used instead of padding as it did a better job).

    Any ideas? I want the vertical scrollbar to extend the whole length of the DIV.

    Paul O'B: Your solution worked a treat, thanks for that

    You both got rep.


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
  •