jQuery, CSS: Two divs, how can I make them “show”next to each other?


Tags: jquery,html,css

Problem :

my client has asked me to make exactly what's happening in this jsFiddle example.

All I need is to make them appear next to each other.

As you see when one is fired it displays in the correct place, but when the other is fired, it pushes the other down.

How can I ensure they always show next to each other?

Note: This is VERY simplified

Thanks :)



Solution :

Add 'float: left' to the first, and remove 'clear: both' from the second, a la http://jsfiddle.net/L2JgX/3/


    CSS Howto..

    How can I make a DIV cursor and background color change if I hover over it?

    css how to only make bold fonts for first
      set

    How to align a table menu to an Banner

    How can I get these two form fields to fill the space between them [duplicate]

    CSS how to select first occuring element after another element

    How to break this Javascript into seperate CSS classes?

    How to Find CSS Selector

    How to make slanted CSS arrow pointing to a div

    How to force a hover state with jQuery?

    How to auto adjust margin to Auto center vertical & horizontal using jQuery and CSS margin

    How to change font on css?

    How to prevent an element to get pushed down by window resize?

    How to prevent auto-rotating images on iOS on HTML with CSS/Javascript

    How do I center align a div that contains floated elements?

    How to abruptly stop a linear animated jQueryUI slider handle (crossbrowser)

    when hovering on iframe, how do I trigger a class on element outside of iframe?

    How to convert a JSON object (created by jquery-css-parser) back to valid CSS code? [closed]

    how to make a div toggle background-position “onclick” while keeping hover

    How can I make a div with “position:fixed” to stay out of the screen if the window overflows?

    How to get a smooth sine wave alternation with Javascript/JQuery CSS

    How to feature detect for CSS custom properties? [duplicate]

    How to create readonly textbox-like structure using html (div/span) and css?

    How to override the css using the JQuery

    How do I get this div to cover flash control (jw player)?

    How to create arrows (with 3 lines) in CSS?

    How to do a webkit css endless rotation-animation.

    how to add dots (…) with the same width?

    CSS: How to change font-size of something that already has “font-size: 0.9em !important” on it [duplicate]

    How to simplify CSS code

    How to remove shadow from slider backround using Html/Css?