2 Columns... 1 Problem

Discussion in 'HTML' started by 1995 Cobra, Jan 31, 2007.

  1. 1995 Cobra

    1995 Cobra Guest

    Greetings all, still fairly new to CSS and all the great layout issues
    that come with different browsers. Quick question. I have a
    "container" <div> that is 980px wide. Inside it are 2 other <div>. One
    is 660px wide and the other is 300px. They are floated left and right
    respectively. Logically this should leave 20px between them. They have
    no borders, padding, or margins. Problem is, in IE the one floated
    right is on the right side, but doesn't begin until after the one on
    the left... almost like it had {cleared} it. I am not using any clears
    however. I have several other <div> and <span> inside these two
    columns, again none of which use {clear} and none whos properties
    exceed the column width. Any ideas? Site can be viewed here: http://
    www.healthcarenewsnetwork.tv

    Thank you
    1995 Cobra, Jan 31, 2007
    #1
    1. Advertising

  2. 1995 Cobra

    Peter Smit Guest

    1995 Cobra wrote:
    > Greetings all, still fairly new to CSS and all the great layout issues
    > that come with different browsers. Quick question. I have a
    > "container" <div> that is 980px wide. Inside it are 2 other <div>. One
    > is 660px wide and the other is 300px. They are floated left and right
    > respectively. Logically this should leave 20px between them. They have
    > no borders, padding, or margins. Problem is, in IE the one floated
    > right is on the right side, but doesn't begin until after the one on
    > the left... almost like it had {cleared} it. I am not using any clears
    > however. I have several other <div> and <span> inside these two
    > columns, again none of which use {clear} and none whos properties
    > exceed the column width. Any ideas? Site can be viewed here: http://
    > www.healthcarenewsnetwork.tv
    >
    > Thank you
    >

    the div slot1 is 660px but is positioned with 135px left.
    Peter
    Peter Smit, Jan 31, 2007
    #2
    1. Advertising

  3. Scripsit 1995 Cobra:

    > Greetings all, still fairly new to CSS


    We can see that from the following:

    > I have a "container" <div> that is 980px wide.


    > Any ideas?


    Learn CSS from some good textbook or tutorial. Hint: Material that teaches
    you to use px for anything but directly image-related issues isn't good.

    You'll just get farther in a wrong direction if you proceed now. Return to
    the starting point and get a fresh start.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Jan 31, 2007
    #3
  4. 1995 Cobra

    Andy Dingley Guest

    On 31 Jan, 17:17, "Jukka K. Korpela" <> wrote:

    > Learn CSS from some good textbook or tutorial.


    Do you have recommendations?
    Plenty of bad ones out there, good ones are worth knowing about.
    Andy Dingley, Jan 31, 2007
    #4
  5. Andy Dingley wrote:
    > On 31 Jan, 17:17, "Jukka K. Korpela" <> wrote:
    >
    >> Learn CSS from some good textbook or tutorial.

    >
    > Do you have recommendations?
    > Plenty of bad ones out there, good ones are worth knowing about.
    >

    So far the ones at www.htmldog.com are the best I've seen

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Jan 31, 2007
    #5
  6. 1995 Cobra

    dorayme Guest

    In article
    <>,
    "Andy Dingley" <> wrote:

    > On 31 Jan, 17:17, "Jukka K. Korpela" <> wrote:
    >
    > > Learn CSS from some good textbook or tutorial.

    >
    > Do you have recommendations?
    > Plenty of bad ones out there, good ones are worth knowing about.


    I have!

    Read "Head First HTML & CSS" (readable tutorial, encourages the
    right mindset, not a good reference)

    Read Lie & Bos (readable, accurate, good reference afterwards)

    Read <brainjar.com> (best and most readable text I know of on
    CSS positioning and especially float)

    Code valid HTML. Getting CSS to work is hard enough with valid
    code, trying to do it without is crazy.

    Validate your HTML, so that it actually _is_ valid

    Write well-structured HTML. Less is more. A minimal HTML page is
    usually better than one with excess taggage all over the place.

    Write detailed HTML. HTML should be minimalised as much as
    possible, but no further! If you _need_ that extra <div> or
    <br>, then use it. Don't play gymnastics with CSS selectors when
    a slight addition to the HTML gives a simpler solution overall.

    Don't pander to browser errors. If you can't fix it neatly in 5
    minutes, either don't use that feature or just let the IE users
    suffer until they learn bettter. _Don't_ write crap code just
    because it works in this Tuesday's IE patch. You have to live
    with this stuff long-term afterwards.

    --
    dorayme
    dorayme, Jan 31, 2007
    #6
    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. helpful sql
    Replies:
    0
    Views:
    809
    helpful sql
    May 19, 2005
  2. Replies:
    5
    Views:
    593
  3. Replies:
    4
    Views:
    937
  4. =?Utf-8?B?YmVub2l0?=

    Read CSV - string Columns - Int columns

    =?Utf-8?B?YmVub2l0?=, May 8, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    433
    =?Utf-8?B?YmVub2l0?=
    May 8, 2006
  5. Jacksm
    Replies:
    2
    Views:
    848
    Paul Chalekian
    Nov 21, 2006
Loading...

Share This Page