Two divs on the same line, but no horizontal scrollbar in IE, justpushes content down

Discussion in 'HTML' started by BerlinBrown, Sep 8, 2008.

  1. BerlinBrown

    BerlinBrown Guest

    I have two DIVs on the same line, a left navigation frame and the
    right content. I want both of those items on the same line. Lets say
    the left nav content is 140pixels and the right content is 1400
    pixels. In internet explorer, if I put these together the right
    content is pushed below the left nav on a separate row. I want them
    on the same line. I guess I could use a table and that would fix it,
    but I don't have access to change the left nav, so I am stuck with
    changing the div on the right content or something else. How can I
    put the same line?

    Pseudo Code (in the event my HTML won't submit here):
    ---------------------

    #leftframe {
    background-color:#E5EEF6;
    border:1px solid black;
    float: left;
    font-size:12px;
    margin:0px 5px 0px 0px;
    padding:0px;
    width:145px;
    height: 1024px;
    }

    [div id="leftframe"]
    Left Nav cotnent
    [/div]
    [div style="width: 1400px"]
    The right content
    [/div]

    --------------

    Real Code:

    <body>
    <head>
    <style type="text/css">
    #leftframe {
    background-color:#E5EEF6;
    border:1px solid black;
    float: left;
    font-size:12px;
    margin:0px 5px 0px 0px;
    padding:0px;
    width:145px;
    height: 1024px;
    }
    </style>
    </head>
    <html>
    <div id="leftframe">
    <br />
    <table style="border-collapse: collapse;width=142px" border="0">
    <tr>
    <td valign="top" style="font-size:12px;font-weight:bold;border-
    bottom:thin solid lightblue">
    &nbsp;&nbsp;Options
    </td>
    </tr>
    </table>

    <span style="padding-left=6">
    <a class="leftnav_link" href="Summary">Report</a>
    </span>
    <br>

    <br>
    <span style="padding-left=6;font-size:11px;color: #0000AA">
    Log
    </span>

    <hr size="2" noshade color="lightblue"><br>

    <table style="border-collapse: collapse;width=142px" border="0">
    <tr>
    <td valign="top" style="font-size:12px;font-weight:bold;border-
    bottom:thin solid lightblue">
    &nbsp;&nbsp;Tools
    </td>
    </tr>
    </table>
    </div>

    <div>
    <table style="width: 1300px; border: 2px solid #000">
    <tr>
    <td nowrap="nowrap" style="font-size:12pt; 1px solid #000;">This is
    a test</td>
    </tr>
    </table>

    </div>
    </body>
    </html>
     
    BerlinBrown, Sep 8, 2008
    #1
    1. Advertising

  2. BerlinBrown

    Kiran Makam Guest

    Re: Two divs on the same line, but no horizontal scrollbar in IE,just pushes content down

    1. For the div which holds the right content give float: left and
    2. reduce the table width to fit the screen.
    In my 1024x768 screen size, i gave widht as 800px. It worked fine, see
    the code below. For more on this google for CSS based layouts.

    ---------
    <div style="float:left">
    <table style="width: 800px; border: 2px solid #000">
    <tr>
    <td nowrap="nowrap" style="font-size:12pt; 1px solid #000;">This is
    a test</td>
    </tr>
    </table>

    </div>
    --------

    Kiran Makam
     
    Kiran Makam, Sep 8, 2008
    #2
    1. Advertising

  3. BerlinBrown

    Ari Heino Guest

    Re: Two divs on the same line, but no horizontal scrollbar in IE,just pushes content down

    > Lets say
    > the left nav content is 140pixels and the right content is 1400
    > pixels.


    I hope this is just an example, or do you really assume that everybody
    has 1540+ pixels wide monitors? No one likes horizontal scrollbars, as
    has been said umpteen times.

    --
    Ari
    http://users.utu.fi/athein/
     
    Ari Heino, Sep 8, 2008
    #3
  4. BerlinBrown

    BerlinBrown Guest

    Re: Two divs on the same line, but no horizontal scrollbar in IE,just pushes content down

    On Sep 8, 1:13 pm, Ari Heino <> wrote:
    > > Lets say
    > > the left nav content is 140pixels and the right content is 1400
    > > pixels.

    >
    > I hope this is just an example, or do you really assume that everybody
    > has 1540+ pixels wide monitors? No one likes horizontal scrollbars, as
    > has been said umpteen times.
    >
    > --
    > Arihttp://users.utu.fi/athein/


    Just an example, and "Kiran Makam" and your solution wouldn't work. I
    want to have the scrollbar.
     
    BerlinBrown, Sep 8, 2008
    #4
  5. Re: Two divs on the same line, but no horizontal scrollbar in IE, just pushes content down

    On 2008-09-08, BerlinBrown wrote:
    > On Sep 8, 1:13 pm, Ari Heino <> wrote:
    >> > Lets say
    >> > the left nav content is 140pixels and the right content is 1400
    >> > pixels.

    >>
    >> I hope this is just an example, or do you really assume that everybody
    >> has 1540+ pixels wide monitors? No one likes horizontal scrollbars, as
    >> has been said umpteen times.

    >
    > Just an example, and "Kiran Makam" and your solution wouldn't work. I
    > want to have the scrollbar.


    Why? Do you like annoying your readers?

    --
    Chris F.A. Johnson, webmaster <http://Woodbine-Gerrard.com>
    ===================================================================
    Author:
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
     
    Chris F.A. Johnson, Sep 8, 2008
    #5
  6. BerlinBrown

    Neredbojias Guest

    Re: Two divs on the same line, but no horizontal scrollbar in IE, just pushes content down

    On 08 Sep 2008, BerlinBrown <> wrote:

    > I have two DIVs on the same line, a left navigation frame and the
    > right content. I want both of those items on the same line. Lets say
    > the left nav content is 140pixels and the right content is 1400
    > pixels. In internet explorer, if I put these together the right
    > content is pushed below the left nav on a separate row. I want them
    > on the same line. I guess I could use a table and that would fix it,
    > but I don't have access to change the left nav, so I am stuck with
    > changing the div on the right content or something else. How can I
    > put the same line?


    Interesting example. Firefox and Safari render it the way you want; IE
    and Opera render it the other way. Must be one of those user-agent
    options the wc3 so sagely built into css.

    Anyway, you should have posted a url. Your markup has several errors
    which suggest the author is a careless and/or unlearned person. A fix is
    simple, and I believe at least one has already been proposed.

    Ciao.

    --
    Neredbojias
    http://www.neredbojias.org/ http://www.neredbojias.net/
    Great Sights and Sounds
    http://adult.neredbojias.org/ (adult)
     
    Neredbojias, Sep 8, 2008
    #6
  7. Re: Two divs on the same line, but no horizontal scrollbar in IE, just pushes content down

    Ari Heino wrote:

    >> Lets say
    >> the left nav content is 140pixels and the right content is 1400
    >> pixels.

    >
    > I hope this is just an example, or do you really assume that everybody
    > has 1540+ pixels wide monitors?


    Or, probably more importantly, that everybody has 1540+ wide viewports.


    --
    Blinky
    Killing all posts from Google Groups
    The Usenet Improvement Project: http://improve-usenet.org
    Need a new news feed? http://blinkynet.net/comp/newfeed.html
     
    Blinky the Shark, Sep 8, 2008
    #7
  8. BerlinBrown

    Bergamot Guest

    Re: Two divs on the same line, but no horizontal scrollbar in IE,just pushes content down

    BerlinBrown wrote:
    >
    > Real Code:
    >
    > <body>
    > <head>
    > </head>
    > <html>
    > </body>
    > </html>


    Try validating your code. It may or may not clear up your problem but at
    least it will eliminate syntax errors as a cause of rendering problems.

    Then instead of posting code, upload your page to a publicly available
    server and post the URL. You'll get a better response from the regulars
    if you make this effort.

    BTW, without a DOCTYPE, you're throwing all browsers into quirks mode.
    Don't expect any consistent results, especially between IE and other
    browsers.

    --
    Berg
     
    Bergamot, Sep 8, 2008
    #8
  9. BerlinBrown

    Ari Heino Guest

    Re: Two divs on the same line, but no horizontal scrollbar in IE,just pushes content down

    > Try validating your code.

    <snip>

    > Then instead of posting code,


    <snip>

    > BTW, without a DOCTYPE,


    <snip>

    Whoa. What a deja vu. There should be an automatic response function
    that sends this reply to all asking for help and save human work on the
    first phase of helping.

    --
    Ari
    http://users.utu.fi/athein/
     
    Ari Heino, Sep 9, 2008
    #9
  10. BerlinBrown

    dorayme Guest

    Re: Two divs on the same line, but no horizontal scrollbar in IE, just pushes content down

    In article <ga4u8n$1n0r$>,
    Ari Heino <> wrote:

    > > Try validating your code.

    >
    > <snip>
    >
    > > Then instead of posting code,

    >
    > <snip>
    >
    > > BTW, without a DOCTYPE,

    >
    > <snip>
    >
    > Whoa. What a deja vu. There should be an automatic response function
    > that sends this reply to all asking for help and save human work on the
    > first phase of helping.


    So you know about these things Ari is saying already and chose to ignore
    them?

    Have you ever seen the film Groundhog Day? Were you unduly
    influenced/paralysed by it? Do you believe in the theory of the endless
    recycling of history? Do you feel helpless against this Great Tide? I
    can help you with my pamphlet, How to Cope with Fate if you feel
    oppressed by it, please send $US43.85

    --
    dorayme
     
    dorayme, Sep 9, 2008
    #10
  11. BerlinBrown

    John Hosking Guest

    Re: Two divs on the same line, but no horizontal scrollbar in IE,just pushes content down

    dorayme wrote:
    > In article <ga4u8n$1n0r$>,
    > Ari Heino <> wrote:
    >
    >>> Try validating your code.

    >> <snip>
    >>
    >>> Then instead of posting code,

    >> <snip>
    >>
    >>> BTW, without a DOCTYPE,

    >> <snip>
    >>
    >> Whoa. What a deja vu. There should be an automatic response function
    >> that sends this reply to all asking for help and save human work on the
    >> first phase of helping.

    >
    > So you know about these things Ari is saying already and chose to ignore
    > them?


    Um, aren't you *replying* to Ari?

    (Possibly you are confused because Ari omitted attributions to
    Bergamot's input.)


    --
    John
    Bad, Ari! Bad! No biscuit!
     
    John Hosking, Sep 9, 2008
    #11
  12. BerlinBrown

    dorayme Guest

    Re: Two divs on the same line, but no horizontal scrollbar in IE, just pushes content down

    In article <48c67dce$>,
    John Hosking <> wrote:

    > dorayme wrote:
    > > In article <ga4u8n$1n0r$>,
    > > Ari Heino <> wrote:
    > >
    > >>> Try validating your code.
    > >> <snip>
    > >>
    > >>> Then instead of posting code,
    > >> <snip>
    > >>
    > >>> BTW, without a DOCTYPE,
    > >> <snip>
    > >>
    > >> Whoa. What a deja vu. There should be an automatic response function
    > >> that sends this reply to all asking for help and save human work on the
    > >> first phase of helping.

    > >
    > > So you know about these things Ari is saying already and chose to ignore
    > > them?

    >
    > Um, aren't you *replying* to Ari?
    >
    > (Possibly you are confused because Ari omitted attributions to
    > Bergamot's input.)


    Possibly!

    My lawyer says I should make a statement that is totally independent of
    who said what to indicate my position on this matter and to avoid any
    legal action. So here it is:

    If someone tells someone else to put a doctype in and not to post so
    much code, then this is perfectly right and proper and good and can be
    helpful in many ways. If the person that the advice was directed to
    "knew" that advice without needing to be reminded (deja vu) but
    nevertheless went ahead and ignored it and later remarked that he
    already knew it - having heard it many times before, then that person is
    being a bit of a dickhead. That is what I think at least.

    Oops.. my lawyer is frowning and shaking his head. I never seem to be
    able to please him. Got to go.

    --
    dorayme
     
    dorayme, Sep 10, 2008
    #12
    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. rich
    Replies:
    0
    Views:
    724
  2. 3 horizontal divs

    , Sep 1, 2006, in forum: HTML
    Replies:
    1
    Views:
    1,336
    Neredbojias
    Sep 1, 2006
  3. Wobblem
    Replies:
    4
    Views:
    884
    Mike S
    Sep 4, 2010
  4. Robin9876
    Replies:
    1
    Views:
    947
    Elmo Watson
    Sep 12, 2007
  5. maya
    Replies:
    4
    Views:
    243
Loading...

Share This Page