开发者

how do I move this to the right?

How do i move this to the right ?

<div class="contentcontainer med left">
            <div class="headings alt">
                <h2>Medium Width - Heading title here</h2>
            </div>
            <div class="contentbox">
                <form action="#">
                    <p>
                        <label for="textfield"><strong>Text field:</strong></label>
                        <input type="text" id="textfield" class="inputbox" /> <br />
                        <span class="smltxt">(This is an example of a small descriptive text for input)</span>
                    </p>
                    <p>
                        <label for="errorbox"><span class="red"><strong>Missing field:</strong></span></label>
                        <input type="text" id="errorbox" class="inputbox errorbox" /> <img src="img/icons/icon_missing.png" alt="Error" /> <br />
                        <span class="smltxt red">(This is some warning text for the above field)</span>
                    </开发者_如何学Cp>
                    <p>
                        <label for="correctbox"><span class="green"><strong>Correct field:</strong></span></label>
                        <input type="text" id="correctbox" class="inputbox correctbox" /> <img src="img/icons/icon_approve.png" alt="Approve" />
                    </p>
                    <p>
                        <label for="smallbox"><strong>Small Text field:</strong></label>
                        <input type="text" id="smallbox" class="inputbox smallbox" />
                    </p>
                    <select>
                        <option>Dropdown Menu Example</option>
                    </select>  <br /> <br />

                    <input type="file" id="uploader" /> <img src="img/loading.gif" alt="Loading" /> Uploading...

                    <p> <br />
                        <input type="checkbox" name="checkboxexample"/> Checkbox
                    </p>
                    <p>
                        <input type="radio" name="radioexample" /> Radio select<br />
                    </p>

                </form>         
                <textarea class="text-input textarea" id="wysiwyg" name="textfield" rows="10" cols="75"></textarea>
                <p><br /><br />Buttons styles</p>
                <input type="submit" value="Submit" class="btn" /> <input type="submit" value="Submit (Alternative)" class="btnalt" />
            </div>
        </div>


Try setting the css 'margin-left' property of the outer div to push it away from the left side of the screen.

<div class="contentcontainer med left" style="margin-left: 200px;">

(change 200 to an appropriate number).

Note: try not to use inline 'style' attribute in your final product - put it in an external stylesheet :)


if you want to move everything to right, use css "float: right".

For example:

<div class="contentcontainer med left" style="float: right">


You can offset by a set-amount with the CSS margin property:

<div class="contentcontainer med left" style="margin-left: 50px;">
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜