开发者

CSS help please, 2 objects refuse to remain on same line

开发者 https://www.devze.com 2023-01-13 18:30 出处:网络
I\'m sorry for being a css noob and would appreciate someone to guide me in the right direction. Webpage i need help with can be found at http://filefx.com

I'm sorry for being a css noob and would appreciate someone to guide me in the right direction.

Webpage i need help with can be found at http://filefx.com

When you hit the page, you will notice that the "Select Files" icon and "Upload Files" icon are not on the same line.

The "Select Files" icon is actually an psuedo upload icon that overlays the real

Right now, whenever i try to put the two icons next to eachother, the "Upload Files" icon gets pushed to the next time and I need these two objects to be on the same line.

So if someone could advise a method to g开发者_运维知识库et this done, you'd make me one happy camper.

:) Thanks


<div style="width:200px;">
<div style="width:98px;float:left;">Select files</div>
<div style="width:98px;float:left;">Upload files</div>
</div>


here's how I did it:

the HTML around the upload button with the inline style I changed to:

<div style="position: absolute; right: 0pt; top: 0pt;">     <div id="upload_buttons_container">
        <!--<input type="image" SRC="templates/default/images/Flexshare-Reset.png" id="reset_button" name="reset_button" value="Reset" class="upload">-->
        &nbsp;&nbsp;&nbsp;
        <input type="image" class="upload" value="Upload" name="upload_bn" id="upload_button" src="images/uploadfiles.PNG">
      </div></div>

In the CSS I made the following changes:

.upload {
position:relative;
width:100%;
}

#upload_buttons_container {
width:300px;
}

form .fakeupload {
background:url("../images/selectfiles.PNG") no-repeat 100% 100% transparent;
height:75px;
width:300px;
}


Try with:

<div style="float: left; width: 50%;">
select files
</div>
<div style="float: right; width: 50%;">
upload files
</div>


you need to set:

.fakeupload need to have a width ie and float:left

#file_picker_container width:0; float:left;

The div arround the upload button width:40%; float:left;

Open the page up using firebug and play with the CSS

0

精彩评论

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

关注公众号