I'm having a problem getting two div elements to line up side by side:
I'm using a slider on my homepage.php called easySlider1.7.js to cycle through a couple of posts in a ceratain category.
In conjunction with a file called slider.php, it generates a div element with an id of "slider", and is used in the homepage by calling:
<?php include("slider.php"); ?>
I have a sidebar I want to apply specifically to the homepage, called sidebar-homepage.php, consisting of just a few links, in its own div, called "sidebar-homepage". This is included directly under the call to the slider in homepage.php:
<?php get_sidebar("homepage"); ?>
No matter what I've tried so far, the sidebar always appears under the slider. Here is the css for the areas concerned:
#slider li{
width:742px;
height:407px;
float: left;
list-style:none;
background:#4eb9d0;
#sidebar-homepage{
float:left;
width:250px;
background:url(images/sidebarleft.png) no-repeat 0 0;
padding:20px;
I have:
- Tried specifying no float, float: left for both, and display: inline-block.
- Set the width of both divs to 50px, to make sure one wasn't pushing the other out of alignment.