1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Easy Question for a Coder - WP Sidebar

Discussion in 'General Programming Chat' started by skorpion, Feb 8, 2009.

  1. skorpion

    skorpion Regular Member

    Joined:
    Dec 28, 2008
    Messages:
    266
    Likes Received:
    55
    I was hoping someone could help me get my ad blocks in the first pic layout like the ad blocks in the second pic.

    I want mine to be 2 wide like the second pic instead of one single row. There must be some code I have to place where I want the image row to break?

    Any help would be greatly appreciated!!

    [​IMG]

    [​IMG]

    Here is the code I have in the sidebar for this:


    Code:
    <ul id="sidebarwidgeted">
    	
    	<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?>
    	
    		<div class="sidebar-box">
    				<h2>Site Sponsors</h2>
    				<div class="sidebar-ads">
    					
    <div class="sidebar-ads-in">
    
    <div>
    				<div>
    					<div>
    
    
    					
    <br />  
    
    <a onmouseover="window.status='http://xxxxx.com';return true;" onmouseout="window.status=' ';return true;" href="http://xxxxx.com" target="_blank">
    <img src="http://xxxxxx.com/affiliates/images/125x125.gif" /></div>
    
    <br />  
    
    					<div class="sidebar-ads-in"><script type="text/javascript" src=http://www.xxxxx.com/xxx/xx/xxxxx/CODE7/125x125/1.gif></script></div>
    					
    					<br />  
    					
    					
    
    					<div class="sidebar-ads-in"><a href="xxxxxxx.net/xxxxxxx" target="_blank" onmouseover="window.status='http://xxxxxxxx.com';return true;" onmouseout="window.status=' ';return true;">
    <img src="http://www.xxxxx.com/xxxxx" width="126" height="126" alt="Free trial" border="0"/></a></div>
    
    <br />  
    
    					<div class="sidebar-ads-in"><a href="http://www.xxxxxx.net/xxxxxxxx" target="_blank" onmouseover="window.status='http://www.xxxxxx.com';return true;" onmouseout="window.status=' ';return true;">
    <img src="http://xxxxxx/xxxxxxxxx" width="125" height="125" alt="xxxxxxxxx" border="0"/></a></div>
    
    
    </div></div>
    			</div>
    		
    	<?php endif; ?>
    	
    	</ul>
     
  2. undeterminederror

    undeterminederror BANNED BANNED

    Joined:
    Mar 31, 2008
    Messages:
    630
    Likes Received:
    457
    check out style.css
    find: sidebar-ads-in
    add a float: left;
    come back an let me know if work.
     
    • Thanks Thanks x 1
  3. da buck

    da buck Regular Member

    Joined:
    Feb 24, 2008
    Messages:
    317
    Likes Received:
    116
    Location:
    Ohio
    There is a plug-in that will do this for you. I'll see if I have it somewhere.

    I found it. This one works well.
    Code:
    http://rapidshare.com/files/195673178/gotbanners.rar
     
    • Thanks Thanks x 1
    Last edited: Feb 8, 2009
  4. skorpion

    skorpion Regular Member

    Joined:
    Dec 28, 2008
    Messages:
    266
    Likes Received:
    55
    OK so where do I ad the float: left; ?

    Thank you!!

    Code:
    .commenttext-admin {
    	clear: both;
    	margin: 3px 0px 10px 0px;
    	padding: 20px 10px 5px 10px;
    	width: 490px;
    	background: #FFFFFF url(images/comment.gif) no-repeat top left;
    	}sidebar-ads-in 
     
  5. nasal

    nasal Registered Member

    Joined:
    Nov 27, 2008
    Messages:
    66
    Likes Received:
    25
    Occupation:
    Student
    Location:
    Slovenia
    Home Page:
    you should have something like:

    Code:
    .sidebar-ads-in {
    width: 125px; 
    blabla: blabla;
    *
    }
    
    Add float: left; where the * is..

    But that's not it, you have linebreaks (<br/>), try to remove those.
     
    • Thanks Thanks x 1
  6. skorpion

    skorpion Regular Member

    Joined:
    Dec 28, 2008
    Messages:
    266
    Likes Received:
    55
    so it would look something like this?

    Code:
    .commenttext-admin {
    	clear: both;
    	margin: 3px 0px 10px 0px;
    	padding: 20px 10px 5px 10px;
    	width: 490px;
    	background: #FFFFFF url(images/comment.gif) no-repeat top left;
    	.sidebar-ads-in {
    width: 125px; 
    blabla: blabla;
    float: left;
    }
    So what happens to blabla: blabla; ??

    Sorry if these are stupid questions....


    Also, does it matter that this is in the Comments section of my style.css?
     
  7. skorpion

    skorpion Regular Member

    Joined:
    Dec 28, 2008
    Messages:
    266
    Likes Received:
    55
    Thanks!! I will check this out.
     
  8. skorpion

    skorpion Regular Member

    Joined:
    Dec 28, 2008
    Messages:
    266
    Likes Received:
    55
    I love that gotbanners plugin. This seems to be working!!! Thanks!!!
     
  9. skorpion

    skorpion Regular Member

    Joined:
    Dec 28, 2008
    Messages:
    266
    Likes Received:
    55
    http://rotatee.com/

    This one is even better!!! Just thought Id post it in case anyone else finds this thread in a search. This one will rotate the ads so different ones show on each page reload.