English 中文(简体)
a 干 的两 d
原标题:Rendering two div in a div horizantally

我有一个双亲小夫,有两个小孩,在马匹兹里,我想加上其他四分之四,这样就应该有想象力。

这里是法典。

<div id="parent">
     <div id="left"></div>
      <div id="right"></div>
</div>

Here, If i add other div to parent ,It will append at last,but should not be shown and pagination should come. Using floats, I am making the div s horizantal.I have to show only two div s,After that pagination should come.

问题回答

这只是<>DEMO:

<><>><>><>><>>>><>>>><>>>>><>>>>><>>>><>>>><>>>><>><>>><>>><>>>>><>>>>>><>>>>>>>><>>>>>><>>>>>>>><>>>>>><>>>>>>>>><>>>>>><>>>>>><>>>>>><>>>>>>><>>>>>>>>>>>>><>>>>>>>>>>>>>>>>>>>>>>><>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

<div id="parent">
  <div id="wrapper">
    <div id="left">window 1</div>
    <div id="right">window 2</div>
  </div>
</div>
<div id="paginator"><span id="prev">Previous</span><span id="next">Next</span></div>

<><><>:>>>>>

#parent {
    width: 850px;
    overflow: hidden;
    padding: 10px;
    height: 320px;
    border: 1px solid #f00
}
#wrapper div {
    width: 400px;
    border: 1px solid #ccc;
    height: 300px;
    display:inline-block;
    margin: 10px
}
#paginator {
    margin: 10px;
    display: block
}
#paginator span {
    width: 30px;
    padding: 5px;
    margin: 10px;
    background: #1f1f1f;
    color: #fff;
}

<><>>>>[><>>>>>>>

$(function() {
    $( #next ).click(function() {
        $( #wrapper ).append($( <div>window 3</div><div>window 4</div> )); // you can add div using other way
        $( #wrapper ).animate({
            marginLeft:  -=860px 
        },
        500,  linear );
    });
    $( #prev ).click(function() {
        $( #wrapper ).animate({
            marginLeft:  +=860px 
        },
        500,  linear );
    });
});

我不敢理解你的问题,但我要说一枪......。

<div id="parent">
     <div id="left"></div>
     <div id="right"></div>
</div>
<div style="clear:both"></div>

<div id="pagination"></div>

......你指的是什么?





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签