getting title and content on same line
-
I’ve been working on this for hours. wordpress wraps the content into a
<p>
tag, so content and title show out on two different lines. I would be able to hack the code in order to strip the tag off, but I’d like to do this working on the theme alone. I tried setting the css float property on the title, like this:
<div class="post">
<span style="float: left"><?php the_title()?></span>
<span><?php the_content() ?></span>
</div>
It works, except that (using firefox) the<div>
now wants some empty space above and beneath itself, so that the metadata (user, time, etc) is somehow further from the post than I want it to be. (yes, the margin properties are already set to 0).
putting the metadata inside the<div>
screws something up, I don’t know why, and the content will show up on the right of the title but on a different line.Last idea I had was to put the_content() inside a comment tag, and start every post with
-->
(ending it with<!--
) so that the<p>
tag will be ignored, but this would work only for new posts (old entries would disappear).If all this sounds lame, sorry, but I just learnt what I know about html, php and css in one single evening, so I’m not really able to think clear right now ?? Any other ideas?
- The topic ‘getting title and content on same line’ is closed to new replies.