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.

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.

 

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.