WordPress.org

Ready to get started?Download WordPress

Forums

Text displayed smaller than CSS style (3 posts)

  1. lt4205
    Member
    Posted 5 years ago #

    Hi, I'm working on developing a theme, and I came accross this problem testing posts.
    All text enclosed within <p> tags is displayed at 11px, instead of the 13 I specified in the CSS file. When I "view source code" the <p> tag is changed to
    <p style="margin: 0.0px 0.0px 14.0px 0.0px; text-align: justify; line-height: 14.0px; font: 11.0px Arial;">

    I just don't know where the 11px is coming from, the only text set to that size in the CSS file is <small> tags, which I don't use a lot of. The <small> text is displayed at the right size.

    I can't post a url because I'm hosting locally.

    Any help is appreciated!

  2. Are you copying text from a word file or something like that? There should be no inline styles added to your code. Maybe look at the html editor and make sure that you don't have extra code in there. There should be no p tags at all.

  3. lt4205
    Member
    Posted 5 years ago #

    not copying anything from anywhere, my index.php file looks like this:

    <div id="post1" class="post">
    						<?php
    							$featured = new WP_Query();
    							$featured->query('showposts=1');
    								while($featured->have_posts()) : $featured->the_post();
    							$wp_query->in_the_loop = true;
    							$featured_ID = $post->ID;
    						?>
    						<?php if (get_post_meta($post->ID, 'large_preview', true)) { ?> 
    
    						<div class="img_block">
    							<img src="<?php echo get_post_meta($post->ID, 'large_preview', true) ?>" alt="featured" />
    						</div>
    						<?php } ?> 
    
    						<div class="text_block">
    							<h2><a href="<?php the_permalink(); ?>"
    								title="<?php the_title(); ?><?php the_title(); ?></a></h2>
    							<small>on <?php the_time('M d'); ?> in
    								<?php the_category(','); ?> tagged
    								<?php the_tags(''); ?> by
    								<?php the_author_posts_link(); ?></small>
    							<?php the_content('Read More'); ?>
    						</div>
    						<?php endwhile; ?>
    						<div style="clear:both"></div>
    						</div><!-- end post 1 -->

Topic Closed

This topic has been closed to new replies.

About this Topic