L Ja
L Ja

Reputation: 1506

How do I align these items properly?

I am currently working on a webpage featuring some jQuery-UI sliders, but I am having trouble properly aligning all of the things.

HTML:

    <div class="row">
        <div id="hue"><img src="download.png" class="hue" /></div>
        <div id="mixedColor"></div>
    </div>
    <div class="rowVert">
        <div class="vert" id="CSVhue"></div>
        <div class="vert" id="CSVsat"></div>
        <div class="vert" id="CSVbright"></div>
    </div>

CSS:

#hue {
    display: block;
    width:  90%;
    float: left;
    margin: 0 auto;
    margin-top: 37px;
}

.hue {
    height: 12px;
    width: 100%;
}

#mixedColor {
    display: block;
    width: 100px;
    height: 100px;
    border: 1px solid black;
    float: right;
}

.vert {
    margin-top: 100px;
}

But without any success.

Here is a JSFiddle: http://jsfiddle.net/npL866zz/1/

How I want it: How I want it

Please note my webpage is optimized for IE7, so all commands must be optimized for this one browser.

Upvotes: 1

Views: 64

Answers (1)

Asons
Asons

Reputation: 87191

Here is something you could work with

Fiddle demo

#hue {
    margin-top: 50px;
    margin-right: 110px;
    overflow: hidden;
}
.hue {
    height: 17px;
    width: 100%;
}
#mixedColor {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 100px;
    height: 100px;
    border: 1px solid black;
}
.rowVert {
    padding-top: 40px;
    padding-right: 110px;
    padding-left: 20%;
}
.vert {
    float: left;
    margin-left: 14%;
    width: 15px;
    height: 100px;
}

Upvotes: 1

Related Questions