Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

wordpress woes

Featured Replies

Ok, I'm still working on my wordpress theme, but am at a loss.

 

I will try and explain the best I can............

 

I am using an image for the content which will obviously expand at the contend gets bigger. (but in my case it's not!)

I also want the sidebar to float to the right.

 

Now if I was using plain ol' simple html/css I would do this

<div id="container">
<div id="content"></div>
<div id="sidebar"></div>
</div>

 

And I used this method (I think) but alas it didn't work.

Here's my index code.....

<?php get_header(); ?>


<!--main content begins-->
<div id="container">
<div id="content">

<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>

	<div class="post" id="post-<?php the_ID(); ?>">

		<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>

		<div class="entry">

			<?php the_content(); ?>

			<p class="postmetadata">
<?php _e('Filed under:'); ?> <?php the_category(', ') ?> <?php _e('by'); ?> <?php  the_author(); ?><br />
<?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> <?php edit_post_link('Edit', ' | ', ''); ?>
			</p>

		</div>

	</div>

<?php endwhile; ?>

	<div class="navigation">
		<?php posts_nav_link(); ?>
	</div>

<?php else : ?>

	<div class="post">
		<h2><?php _e('Not Found'); ?></h2>
	</div>

<?php endif; ?>

</div>
<!--main content ends-->


<?php get_sidebar(); ?>
</div>


<?php get_footer(); ?>

 

Can anyone see any error(s) or suggest a better way of doing it?

  • Author

Here's a simple image for those who don't understand what I mean :)

 

post-4326-1226688566_thumb.jpg

  • Author

Any thoughts anyone?

 

I'm getting pretty desperate now as I can't progress until I sort this out.

Are you closing the container div?

 

I would do it so that the top and bottom of the black area in your example are fixed images (above and below content/sidebar), and then where your arrow is pointing, make that into something that is 1 pixel high and do repeat-y in the CSS? Or have I misunderstood?

 

Float both content and sidebar left* and add clear:both to the footer.

 

*It might be better to float content div left and sidebar div right and make sure that there is a bit of space between so that in some cases it doesn't get broken down to the next line (IE seems to do this sometimes because of their interpretation of the box model).

  • Author

The sidebar seems to be setting the height of the body image (which is 5px high and repeated)

The content spills over into the footer.

 

I know I have made an error, but I can't pin point it. Instead of being snow blind, I'm code blind.

  • Author

Maybe the error is in my css?

 

* {
margin:0; padding:0;
}

body	{

font-family:"Times New Roman", Times, serif;
font-size:16px;
text-align:left;
vertical-align:top;
background-color: #396484;
background-repeat:repeat-x;
color:#333333;
}

a:link, a:visited	{
text-decoration:underline;
color:#336699;
}

#outer		{
background-image:url(images/helenbg_day.png);
background-repeat:repeat-x;
}

#wrapper	{
margin: auto;
width:966px;
text-align:left;

}

#container		{
background-image:url(images/helenbody_day.png);
width:966px;
height:auto;

}

#header		{
background-image:url(images/helenheader_day.png);
background-repeat:no-repeat;
width:966px;
height:275px;
}

a#headerlink	{
}

#content		{
float:left;
width:600px;
padding-left:95px;
padding-bottom:25px;

}

#sidebar		{
float:right;
width:300px;

}

.sidebar ul		{
list-style-type:none;
}



#footer		{
background-image:url(images/helenfooter_day.png);
background-repeat:no-repeat;
height:202px;
width:966px;
padding-top:75px;
text-align:center;



}

I don't suppose you have a live version, do you? You can PM it if you don't want the link to go out public

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.