Why won't my labels float right?

Posted on 2011-04-30
Last Modified: 2012-05-11
Hi, I have labels that I would like to float up or next to the materials div:

But I can't figure out a way to make them move up (besides giving them each an absolute position.) I tried giving them a negative margin-top but that made them all appear in the same spot (over lapping).  Anyone know a way to work around this?
Question by:FairyBusiness
    LVL 18

    Accepted Solution

    OK, just wrap all your labels a div like this:

    <div style="float:left; width:300px;"></div>

    Open in new window

    Then, you can add a float on the materials div like this:

    <div id="materials" style=" float:right;">

    Open in new window

    LVL 18

    Expert Comment

    So you need a 2 column layout. At the minute the only thing with a float is iframe ... everything else will wrap onto a new line, you need to do something like this:

    <div style="float:left;width:300px;">
    <div id="materials" style="float:right;">
      Content here

    Open in new window


    Author Closing Comment


    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
    Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
    The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
    The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now