WordPress.org

Ready to get started?Download WordPress

Forums

fixing post width (2 posts)

  1. npc
    Member
    Posted 9 years ago #

    I've been in need for a REALLY simple posting program and am trying out wordpress. basically, the only function I need is the posting function. I don't need any of the menu's or anything else, just the posting (it's going to be inserted into a frames page). I'm having a problem setting the width of the posts though. I've searched through dozens of faq's and forum posts (i don't have a wp-layout.css file for some reason), but I have yet to find anything that worked. I've tried editing the style.css and the index.php file directly, but no go. here's what i'm trying to do (fix):

    http://assassinsdirect.com/

    here's what's included on my index page:

    <div id="content" class="narrowcolumn">
    <font face='arial' color='grey'>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>

    <div class="post">
    <h2 id="post-<?php the_ID(); ?>"><?php the_title(); ?></h2>
    <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>

    <div class="entry">
    <?php the_content('Read the rest of this entry »'); ?>
    </div>

    and here's what's under that #content section of the style.css:

    #content {
    font-size: 1.2em
    }

    .post {
    background-color: ffffff;
    border: 1px dashed #039;
    padding: 10px 10px;
    width: 400px;
    margin: 0;
    }

    someone else was working on this before me and deleted a bunch of stuff from either the index.php or style.css file in order to get rid of the menu, header, footer, etc... so i don't know if he ended up shooting us in the foot by doing that. basically, it's exactly as we need it now, except for the post width. it looks like its width is set to 100% somewhere, but i can't find where to override it. i appreciate any help! :)

  2. peterx
    Member
    Posted 9 years ago #

    Is your frame wider than 400 pixels or less? If your text is in a frame less than 400 pixels wide then the width:400px will push the text out to the edge. In a frame greater than 400 pixels you can drop the width specification and let the text push the width out. You can also use width:auto. Your frame width should then control the width.

    Body width can override the divisions within body. Javascript can override both. Global search your Web site for 100% then search for width:. You could have a width:700px or width:90% somewhere.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags