define relative width using css

Discussion in 'HTML' started by Ingo Griegert, Oct 20, 2003.

  1. Hope somebody can help me on this one:

    I want to create a DIV that fills the entire width of the window except for
    20px on the right. So no matter how wide the browser window is, there are
    always exactly 20px next to my DIV that are empty.

    20px right margin cannot be used, as there are other elements that will go
    up to the right side of the window.

    Sorry, might be a really easy answer, but I can't come up with it.

    Any ideas? Thanks!
    Ingo Griegert, Oct 20, 2003
    #1
    1. Advertising

  2. Ingo Griegert wrote:

    > I want to create a DIV that fills the entire width of the window except for
    > 20px on the right. So no matter how wide the browser window is, there are
    > always exactly 20px next to my DIV that are empty.


    <div style="margin-right:20px;">
    blah
    </div>

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?id=132
    Toby A Inkster, Oct 20, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. AndrewF
    Replies:
    1
    Views:
    758
    Bruce Barker
    Oct 10, 2005
  2. Lois
    Replies:
    1
    Views:
    3,215
    Ryan Stewart
    Dec 27, 2004
  3. ppcguy
    Replies:
    3
    Views:
    1,252
    Toby Inkster
    Aug 26, 2005
  4. Rob Powell
    Replies:
    4
    Views:
    20,428
    dorayme
    Sep 17, 2006
  5. cera
    Replies:
    1
    Views:
    1,259
    Neredbojias
    Aug 18, 2007
Loading...

Share This Page