Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: div expansion

  1. #1
    Join Date
    Nov 2005
    Posts
    132
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default div expansion

    I am in the process of designing a site.
    I am keen to have a outer 'container' div. with a nice crisp border attribute
    I also want a central div for the 'content', sitting inside the 'container'.

    What is the best practice in sizing these divs ? ensuring that when my 'content' div receives more content over time, the outer container resizes to always leave me with a nice visible outer border.

    thanks

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You could just make the container 100%, or whatever, then the inner one 95% of the outer one.
    Spacing it so that you always have, say, 5 pixels on the edges would be harder, but you might want to look into spacing properties for that.
    For tables, you can have cell-spacing set to a certain number of pixels that will offset from the edges. Not sure if that applies to divs or not, but might be quite helpful.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Nov 2005
    Posts
    132
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    too add.

    I will also be needing to add 2 'header' div's at the topleft and right corners inside the 'container' but as I have to specift floats on these I think they may conflict with the height attribute of the 'container'. Am i right? and is there a work around to this?

  4. #4
    Join Date
    Nov 2005
    Posts
    132
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    well, as ever.

    minutes after posting the problem i seemed to have sorted it.

    cheers

  5. #5
    Join Date
    Nov 2005
    Posts
    132
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    I'd appreciate if anyone has a few spare minutes to maybe look at the site I have started on. I am viewing it on a mac via safari and FF and it looks fine.
    But I am prepared for the worst...

    Are my divs all over the place on other pc browsers? There should be a horizontal header with a green nav below on left and a central div right of the nav. All of this housed in a bordered container.



    thanks. link below
    www.ukbw.com/natural

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Seems ok to me, using IE.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    Nov 2005
    Posts
    132
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    ok, Thanks, do you see this layout ?
    (see attached)

  8. #8
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Yep
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  9. #9
    Join Date
    Nov 2005
    Posts
    132
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    which version of ie are you using?

  10. #10
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Looks fine in Konqueror 3.5.3 as well.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •