Reply to Re: Div tags with PHP

Your name:

Reply:


Posted by amadou.balde on 08/20/06 23:42

Sometimes you just need to take a break after many hours of work. The
more hours you spend the more stupid mistakes you make.
It happens to me all the time.

-----------
Executable Design
http://www.exedesign.com

lawrence.hunt@gmail.com wrote:
> Oh woops, one of my more stupid moments!
> Chuck Anderson wrote:
> > lawrence.hunt@gmail.com wrote:
> > > I cant seem to get CSS to work with my PHP code. An example is this:
> > >
> > > <?php if (isset($_GET['addstory'])): // If the user wants to add a
> > > story
> > > ?>
> > >
> > > <div id="storyform">
> > >
> > > <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
> > > <label>Type your story here:<br />
> > > <textarea name="storytext" rows="10" cols="40">
> > > </textarea></label><br />
> > > <input type="submit" value="SUBMIT" />
> > > </form>
> > >
> > > </div>
> > >
> > > <?php elseif (isset($_GET['addcomment'])): // If the user wants to add
> > > a comment
> > > ?>
> > >
> > > <div id="commentform">
> > >
> > > <form action="<?php echo $_SERVER['PHP_SELF'].'?comment='.
> > > ($_GET['addcomment']); ?>" method="post">
> > > <label>Type your comment here:<br />
> > > <textarea name="commenttext" rows="10" cols="40">
> > > </textarea></label><br />
> > > <input type="submit" value="SUBMIT" />
> > > </form>
> > >
> > > </div>
> > >
> > >
> > > The CSS for this is:
> > >
> > > #storyform {
> > > position: absolute
> > > top: 200px
> > > left:300px
> > > width:724px
> > > height: 500px
> > >
> > > }
> > >
> > > #commentform {
> > > position: absolute
> > > top: 200px
> > > left:300px
> > > width:724px
> > > height: 500px
> > >
> > > }
> > >
> > >
> > >
> > > Nice and basic but should it not move the forms somewhere in the middle
> > > of the screen. Currently they are still positioned as if there was no
> > > styling :S
> > >
> > > I have added other div tags outside of the php i.e. for a navbar
> > > etc.and they work fine.
> > >
> > > Any help would be much appreciated :D
> > > Thanks
> > >
> > >
> > This has nothing to do with using Php, you simply need semi-colons after
> > each style element.
> >
> > i.e., ...
> >
> > #storyform {
> > position: absolute;
> > top: 200px;
> > left:300px;
> > width:724px;
> > height: 500px;
> > }
> >
> > #commentform {
> > position: absolute;
> > top: 200px;
> > left:300px;
> > width:724px;
> > height: 500px;
> > }
> >
> >
> >
> > --
> > *****************************
> > Chuck Anderson · Boulder, CO
> > http://www.CycleTourist.com
> > Everyone's journey should be different,
> > so that we all are enriched
> > in new and endless ways
> > *****************************

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация