Jump to content

text between dynamic text


alejandro52

Recommended Posts

I have some dynamic text inside a div tag here is the code

<div class="entry_text">
  <?php echo nl2br($keim_row["text"]) ?>
  </div>

and i want somewhere in between to add a div tag with some text in it. i fugured out tha if i add a div tag with absolute positioning the text wont move away i.eg the padding wont work. So how do i do that.

Link to comment
Share on other sites

I have not a clear understanding of what your asking, but in your code you miss a semicolon.

<?php echo nl2br($keim_row["text"]) ?>

should be

<?php echo nl2br($keim_row["text"]); ?>

 

The stuff you want with your div Is css related.

I would suggest to give the div a class or ID  and in an external css file define it's properties.

That way you keep things nicely seperated.

 

This is a nice tut on positioning in css: http://w3schools.com/css/css_positioning.asp

 

Hope this helps a bit.

 

Link to comment
Share on other sites

Just manually putting text either side of the <?php echo "whatever;"?> tags would do what you are needing, as whatever is parsed by php would be by definition "dynamic" text..

 

If your needing to use other divs around the area, start with a container div, and then work from that using principals of css, this will give you a good learning curve on the use and deployment of css/div layout - and once you understand inheritance you will wonder what the fuss is about!

 

Rw

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.