我在JQuery
手风琴中有一张表格。我试图将该表单拆分为2列。
<div class="content">
<div id="accordion">
<h3><a href="#">Section 1</a></h3>
<div>
<form enctype="multipart/form-data" method="post" action="somepage.php">
<div id="form_wrapper"> <!--Keep this to the left-->
<label for="number">Number: </label>
<input type="text" id="number" name="number" value="" />
<br />
<label for="name">Name: </label>
<input type="text" id="name" name="name" value="" />
<br />
<label for="address">Address: </label>
<input type="text" id="address" name="address" value="" />
<br />
<label for="city">City: </label>
<input type="text" id="city" name="city" value="" />
<br />
<div id="image_wrapper"> <!--Keep this to the right-->
<img src="" alt="photo" />
<br />
<label for="photo_desc">Photo Description: </label>
<input type="text" id="photo_desc" name="photo_desc" value="" />
<br />
<label for="new_picture">New Facility Photo:</label>
<input type="file" id="new_picture" name="new_picture" />
<br />
</div>
<br />
</div>
<input type="submit" value="Update" name="update">
</form>
</div>
<h3><a href="#">Section 2</a></h3>
<div>
</div>
<h3><a href="#">Section 3</a></h3>
<div>
</div>
<h3><a href="#">Section 4</a></h3>
<div>
</div>
</div>
</div>
我试图让<div id="image_wrapper">
离开手风琴面板的右侧,其余的文字输入和标签位于左侧。
这是一个JSFiddle,展示了我要做的事情以及我所做的事情
我似乎无法让css
恰到好处,任何帮助都会很棒。
答案 0 :(得分:2)
如果我能够很好地回答你的问题,你基本上希望你的list.files2 <- function(
from, # time starts
to, # time ends
tz="GMT", # time zone
which.time=c("mtime","ctime","atime"), # modification/creation/access time?
... # additional arguments passed to `list.files` function
){
which.time <- match.arg(which.time)
.files <- list.files(...)
.from <- as.POSIXct(from,tz=tz)
.to <- as.POSIXct(to,tz=tz)
.whether <- vapply(.files,function(e){
tmp=file.info(e)[[which.time]];
as.numeric(tmp)>=as.numeric(.from) & as.numeric(tmp)<=as.numeric(.to)
},logical(1),USE.NAMES=FALSE)
ret <- .files[.whether]
return(ret)
}
## Call it in your case
list.files2("2005-06-01","2008-10-29",path="C:\\Users\\data",pattern="*.img")
## ## Continue with the above example [in 1)] to check files that were modified today;
## ## set `tz` according to your time zone.
## > list.files2("2015-04-23","2015-04-24",tz="EDT",pattern="*.img")
## [1] "File_20050101_data.img" "File_20060101_data.img" "File_20080101_data.img"
## [4] "File_20090101_data.img"
和你的image_wrapper
并列每个可用宽度的50%。
要实现这一点,最简单的方法是将form wraper
放在html中的image_wrapper
之外,这样它们就可以很好地浮动,然后再添加50%的宽度并向左浮动,我只是添加了: / p>
form wraper
给你的css让一切都合适: FIDDLE