Jump to content

PHP HTML Formatting


korki696

Recommended Posts

Hey all,

I am working on a site right now but I have a problem that I just cant figure out. What i am trying to do is have two echoes that are next to eachother but with different HTML formating.

 

<div class="additional_info ie6fix" id='twitterbox'>
<?php echo $feed[0]; ?>
<h2><?php echo $feed[1]; ?></h2>
<h4><?php echo $feed[2]; ?></h4>
</div>

 

So in that example lets say $feed[1] = "Hello " and $feed[2] = "Mom". I want the output to be Hello Mom. The output i currently get is:

Hello

Mom

with the different formatting. How can i get the two outputs on the same line?

 

Thanks

Link to comment
Share on other sites

heading tags automatically go to the next line. if you want to be next to each other you will have to set their float style, or some other display style try

<div class="additional_info ie6fix" id='twitterbox'>
<?php echo $feed[0]; ?>
<h2 style="float:left"><?php echo $feed[1]; ?></h2>
<h4 style="float:left"><?php echo $feed[2]; ?></h4>
</div>

 

I'm a little rusty on my CSS though, so that might be wrong

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.