This question has been answered by iusemodx. See the first response.
Hi,
I have an Ajaxsearch call on my site that returns info from my pages, this is in the form of a linked pagetitle and an image pulled from a TV. I want to style the results to basically encompass the title and image in a box approx 100x100px - I am a little lost on where to start with the CSS? I would appreciate any help, I would like the boxes to display 3 horizontally and then continue the pattern down the page
Regards,
SB
<div id="content"> [*content*] </div>
<h3><a href="[~[+id+]~]">[+pagetitle+]</a></h3> [+introtext+]<br></br> <img src="[+legoImages+]" alt="Lego images" width="100" height="100" />
</br>
<br />
<br>
#results{display:block; position:relative; width:100%;}
#results ul{display:block; margin:0; padding:0; list-style:none;}
#results ul::before, #results ul::after{display:table; content:" ";}
#results ul::after{clear:both;}
#results ul li{display:block; float:left; width:100px; margin:0 0 25px 25px; padding:0; word-break:break-all; word-wrap:break-word;}
#results ul li:first-child, #results ul li:nth-child(3n+1){margin-left:0; clear:left;}
#results ul li img{max-width:100px;}<div id="results">
<ul>
AJAX CALL HERE
</ul>
</div><li><h3><a href="[~[+id+]~]">[+pagetitle+]</a></h3> [+introtext+]<br> <img src="[+legoImages+]" alt="" /></li>
<li><h3><a href="[~[+id+]~]">[+pagetitle+]</a></h3> [+introtext+]<br> <img src="[+legoImages+]" alt="" /></li>
<div id="results">
<h2>Search<h2>
<ul>
[!AjaxSearch? &ajaxSearch=`0` &ajaxSearch=`0` &showIntro=`0` &showResults=`0` &landingPage=`9` &advSearch=`allwords`!]
</ul>
</div>/*Ajax Results*/
#results{display:block; position:relative; width:100%;}
#results ul{display:block; margin:0; padding:0; list-style:none;}
#results ul::before, #results ul::after{display:table; content:" ";}
#results ul::after{clear:both;}
#results ul li{display:block; float:left; width:100px; margin:0 0 25px 25px; padding:0; word-break:break-all; word-wrap:break-word;}
#results ul li:first-child, #results ul li:nth-child(3n+1){margin-left:0; clear:left;}
#results ul li img{max-width:100px;}
/*End of Ajax Results*/I just need an example/starter to get me going
<div id="content"> <form id="ajaxSearch_form" action="index.php?id=9" method="post"> ... </form> <li><h3><a href="[~~]"></a></h3> <br> <img src="" alt=""></li> </div>
<div id="sidebar-b"> <div id="container3"> <h2>Search<h2> [!AjaxSearch? &ajaxSearch=`0` &ajaxSearch=`0` &showIntro=`0` &showResults=`0` &landingPage=`9` &advSearch=`allwords` &debug=`0`!] </div> </div>
#sidebar-b {
float : right;
width : 170px;
margin : 0;
padding : 10px;
border-left : 1px solid #999;
background : #f2f2f5;
color : #666;
}
#container3 {
width : 180px;
border : 2px solid #000000;
margin-left : auto;
margin-right : auto;
text-align : center;
padding : 0px;
color : #666;
}[!AjaxSearch? &ajaxSearch=`0` &parents=`4` &tvPhx=`legoImages` &whereSearch=`content` &order=`pagetitle` &extract=`2:longtitle,introtext` &showPagingAlways=`1`!]
#content {
padding : 10px;
margin-left : 190px;
margin-right : 190px;
background : inherit;
color : #666;
}