Jump to content

Anders Moen

Members
  • Posts

    866
  • Joined

  • Last visited

Posts posted by Anders Moen

  1. But try to not use style="" because it gets very much code that's not necessary in the document :)Use CSS files.In example:CSS (Save this as style.css for now)

    #some_name_one { width: 100%; text-align: center; }#some_name_two { width: 50%; text-align: center; }

    (X)HTML

    <div id="some_name_one">Here is some text :)</div><div id="some_name_two">Here is even more text</div>

  2. boen_robotI agree to that. Totally unecessary really. What if everybody made a new topic when they hadn't been here for a little while? That would be many topics for nothing...But welcome back anyways.

  3. If you don't write anything in the div's it won't work. Just put   inside or something like this:

    <div id="one"><div id="two"> </div></div>

    I didn't go through the little code you have, so it might be something wrong with the code too. I haven't time to check rigth now so.Edit:Try something like this:CSS

    #one {width: 100px;border: 1px solid black;}#two {padding: 10px;border: 1px solid black;}#three {padding: 10px;border: 1px solid black;}#four {padding: 10px;border: 1px solid black;}

    (X)HTML

    <div id="one"><div id="two"><div id="three"><div id="four"> </div></div></div></div>

    Here's the result

  4. This is HTML:

    <input type="text" name="adsftgd" value="">

    And this is XHTML

    <input type="text" name="adsgdgf" value="" />

    In other words; A space and the slash is XHTML and just this > is HTML if you understand.Like a link should not be like this because it has a starting AND an ending tag (<a></a>), and image has not (<img>)Hope you understood and good luck further :)

  5. Well, what I meant was that when I made the CMS on my old website, if you have seen it (www.andersmoen.hotserv.dk/cms/), I did so many connections. About 15 connections if I don't remember wrong.And I was just wondering if it would work if I just connect on the top of the page, and then put the mysql_query(select ...) some places so I go from 15 connections to 1?

  6. Hey!I can't remember the last time I started a topic in the PHP forum here now, but anyways;If I do this: (over doctype)

    <?phpsession_start();mysql_connect("localhost", "username", "password");mysql_select_db("my_db");?>

    And in ... body I would do this:

    <?phpecho 'This is all of our members<br /><br />';while($row = mysql_fetch_array(mysql_query("SELECT * FROM table WHERE language = 'english' ORDER BY id DESC LIMIT 12))) {echo $row['username'];echo '<br />';}?>

    Would this work? If you don't understand;I do the connection in the start of the page, and then I select from tables some random places in the body just to limit the connections? In example I really have to do ... 20 connections, but can this be limited to 1 by doing this?Thanks in advance!

  7. This would be better in the (X)HTML or CSS forum, wouldn't it? This hasn't anythinmg with PHP to do really..But what forum is this? Can you use the wordwrap function? wordprap($string)Would this work? (CSS)

    #the_div { word-wrap: break-word; }

    I don't know if it's valid though. I just searched for "css wordwrap" at Google

  8. Try to put this in between <head> and </head> and copy the stylesheet and then it might work for IE 7 too:

    <!--[if IE 7]><link rel="stylesheet" type="text/css" href="style_for_sucky_ie_7.css" /><![endif]-->

  9. Note on Anders reply: You can run both ASP and ASP.net on GNU/Linux (as one.com among others) and you can also run PHP (with IIS or Apache) on M$ Win.The thing is that PHP is almost "native on *nix" (Couldn't come up with a better world) as VB and ASP is "native on win". It's often much easier to get PHP working in *nix than win (was along time ago I used PHP on win, so i may have changed...).
    Yes, I know you can, but I didn't say that.
  10. Windows: it's for ASP and ASP.net codingLinux: it's for PHP codingYes, it's a operativsystem, just that it's free compared to Windows. If you are quick, you can request free cd's if you want Linux as your operativsystem. They are sending out the new version of Ubuntu in 2 days I think. (www.uuntu.com)

×
×
  • Create New...