SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Mar 2004
    Posts
    260
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    help - divs beside each other when they shouldn't

    I've got a problem at xxxxxxxxxx
    where the two tables are beside each other. I put them into DIVs thinking that might resolve the problem, but it doesn't. I don't understand the problem. Can anyone help please?

    Thanks
    Last edited by spirelli; May 26, 2005 at 10:49.

  2. #2
    get into it! bigduke's Avatar
    Join Date
    May 2004
    Location
    Australia
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I didn't really go through the code entirely so I don't quite know why the div's were misbehaving. So I altered it a bit and came up with this:
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html dir="ltr">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta http-equiv="Content-Style-Type" content="text/css">
    <link rel="top" href="./index.php?sid=a6d82bbd3eaaaf99d0ab63195146a249" title="home" />
    <link rel="search" href="./search.php?sid=a6d82bbd3eaaaf99d0ab63195146a249" title="Search" />
    <link rel="help" href="./faq.php?sid=a6d82bbd3eaaaf99d0ab63195146a249" title="FAQ" />
    <link rel="author" href="./memberlist.php?sid=a6d82bbd3eaaaf99d0ab63195146a249" title="Memberlist" />
    <title>push :: Index</title>
    <link rel="stylesheet" href="templates/push/push.css" type="text/css">
    <style type="text/css">
    
    /* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
    @import url("templates/push/formIE.css");
    -->
    </style>
    </head>
    <body bgcolor="#E5E5E5" text="#000000" link="#006699" vlink="#5493B4"> 
    <div align="left" id="header"> 
        <div id="navi"></div> 
    </div> 
    <div align="left" id="main"><span class="mainmenu"><a href="privmsg.php?folder=inbox&amp;sid=a6d82bbd3eaaaf99d0ab63195146a249" class="mainmenu"><img src="templates/push/images/icon_mini_message.gif" width="12" height="13" border="0" alt="Private Messages" hspace="3" />Private Messages</a>&nbsp; &nbsp;<a href="profile.php?mode=register&amp;sid=a6d82bbd3eaaaf99d0ab63195146a249" class="mainmenu"><img src="templates/push/images/icon_mini_register.gif" width="12" height="13" border="0" alt="Register" hspace="3" />Register</a>&nbsp; &nbsp;<a href="login.php?sid=a6d82bbd3eaaaf99d0ab63195146a249" class="mainmenu"><img src="templates/push/images/icon_mini_login.gif" width="12" height="13" border="0" alt="Log in" hspace="3" />Log in</a></span></div> 
    <table width="700" cellspacing="0" cellpadding="2" border="0" align="left"> 
        <tr> 
            <td align="left" valign="bottom"><span class="nav"><a href="index.php?sid=a6d82bbd3eaaaf99d0ab63195146a249" class="nav">home</a></span></td> 
            <td align="right" valign="bottom" class="gensmall"> <a href="search.php?search_id=unanswered&amp;sid=a6d82bbd3eaaaf99d0ab63195146a249" class="gensmall">View unanswered posts</a></td> 
        </tr> 
    </table> 
    <p> 
    <table width="700" cellpadding="2" cellspacing="1" border="0"> 
        <tr> 
            <th colspan="2" class="thCornerL" height="25" nowrap="nowrap"> 
                <div align="left">&nbsp;Forum&nbsp;</div> 
            </th> 
            <th width="50" class="thTop" nowrap="nowrap">&nbsp;Topics&nbsp;</th> 
            <th width="50" class="thTop" nowrap="nowrap">&nbsp;Posts&nbsp;</th> 
            <th class="thCornerR" nowrap="nowrap">&nbsp;Last Post&nbsp;</th> 
        </tr> 
        <tr> 
            <td class="catLeft" colspan="2" height="28"><span class="cattitle"><a href="index.php?c=1&amp;sid=a6d82bbd3eaaaf99d0ab63195146a249" class="cattitle">Test category 1</a></span></td> 
            <td class="rowpic" colspan="3" align="right">&nbsp;</td> 
        </tr> 
        <tr> 
            <td class="row1" align="center" valign="top" height="50"><img src="templates/push/images/folder_big.gif" width="46" height="25" alt="No new posts" title="No new posts" /></td> 
            <td width="100%" height="50" valign="top" class="row1"><span class="forumlink"> <a href="viewforum.php?f=1&amp;sid=a6d82bbd3eaaaf99d0ab63195146a249" class="forumlink">Test Forum 1</a><br /> 
                </span> <span class="genmed">This is just a test forum.<br /> 
                </span></td> 
            <td height="50" align="center" valign="top" class="row2"><span class="gensmall">1</span></td> 
            <td class="row2" align="center" valign="top" height="50"><span class="gensmall">2</span></td> 
            <td class="row2" align="center" valign="top" height="50" nowrap="nowrap"> <span class="gensmall">Thu May 26, 2005 12:45 am<br /> 
                <a href="profile.php?mode=viewprofile&amp;u=3&amp;sid=a6d82bbd3eaaaf99d0ab63195146a249">testuser1</a> <a href="viewtopic.php?p=2&amp;sid=a6d82bbd3eaaaf99d0ab63195146a249#2"><img src="templates/push/images/icon_latest_reply.gif" border="0" alt="View latest post" title="View latest post" /></a></span></td> 
        </tr> 
    </table> 
    </p> 
    <table width="700" cellpadding="3" cellspacing="1" border="0"> 
        <tr> 
            <td class="catHead" colspan="2" height="28"><span class="cattitle"><a href="viewonline.php?sid=a6d82bbd3eaaaf99d0ab63195146a249" class="cattitle">Who is Online</a></span></td> 
        </tr> 
        <tr> 
            <td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/push/images/whosonline.gif" alt="Who is Online" /></td> 
            <td class="row1" align="left" width="100%"><span class="gensmall"> The time now is Thu May 26, 2005 3:13 am</span></td> 
        </tr> 
        <tr> 
            <td class="row1" align="left"><span class="gensmall">We have <b>3</b> registered users who wrote a total of <b>2</b> posts. Newest Member: <a href="profile.php?mode=viewprofile&amp;u=4&amp;sid=a6d82bbd3eaaaf99d0ab63195146a249">testmod1</a><br /> 
                There are <b>2</b> users online :: 0 Registered, 0 Hidden and 2 Guests &nbsp; [ <span style="color:#FFA34F">Administrator</span> ] &nbsp; [ <span style="color:#006600">Moderator</span> ]<br /> 
                Registered Users: None<br /> 
                This data is based on users active over the past five minutes</span></td> 
        </tr> 
    </table> 
    <table width="700" cellpadding="1" cellspacing="1" border="0"> 
        <tr> 
            <td align="left" valign="top">&nbsp;</td> 
        </tr> 
    </table> 
    <form method="post" action="login.php?sid=a6d82bbd3eaaaf99d0ab63195146a249"> 
        <table width="700" cellpadding="3" cellspacing="1" border="0"> 
            <tr> 
                <td class="catHead" height="28"><a name="login"></a><span class="cattitle">Log in</span></td> 
            </tr> 
            <tr> 
                <td class="row1" align="center" valign="middle" height="28"><span class="gensmall">Username:
                    <input class="post" type="text" name="username" size="10" /> 
    &nbsp;&nbsp;&nbsp;Password:
                    <input class="post" type="password" name="password" size="10" maxlength="32" /> 
    &nbsp;&nbsp; &nbsp;&nbsp;Rember me.
                    <input class="text" type="checkbox" name="autologin" /> 
    &nbsp;&nbsp;&nbsp; 
                    <input type="submit" class="mainoption" name="login" value="Log in" /> 
                    </span> </td> 
            </tr> 
        </table> 
    </form> 
    <table cellspacing="3" border="0" cellpadding="0"> 
        <tr> 
            <td width="20" align="center"><img src="templates/push/images/folder_new_big.gif" alt="New posts"/></td> 
            <td><span class="gensmall">New posts</span></td> 
            <td>&nbsp;&nbsp;</td> 
            <td width="20" align="center"><img src="templates/push/images/folder_big.gif" alt="No new posts" /></td> 
            <td><span class="gensmall">No new posts</span></td> 
            <td>&nbsp;&nbsp;</td> 
            <td width="20" align="center"><img src="templates/push/images/folder_locked_big.gif" alt="Forum is locked" /></td> 
            <td><span class="gensmall">Forum is locked</span></td> 
        </tr> 
    </table> 
    <br clear="all" /> 
    <div align="center"> 
        <div align="left" id="footer"> <span class="mainmenu"><a href="profile.php?mode=editprofile&amp;sid=a6d82bbd3eaaaf99d0ab63195146a249" class="mainmenu"><img src="templates/push/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="Profile" hspace="3" />Profile</a>&nbsp; &nbsp;<a href="memberlist.php?sid=a6d82bbd3eaaaf99d0ab63195146a249" class="mainmenu"><img src="templates/push/images/icon_mini_members.gif" width="12" height="13" border="0" alt="Memberlist" hspace="3" />Memberlist</a>&nbsp; &nbsp;<a href="groupcp.php?sid=a6d82bbd3eaaaf99d0ab63195146a249" class="mainmenu"><img src="templates/push/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="Usergroups" hspace="3" />Usergroups</a>&nbsp; &nbsp;<a href="search.php?sid=a6d82bbd3eaaaf99d0ab63195146a249" class="mainmenu"><img src="templates/push/images/icon_mini_search.gif" width="12" height="13" border="0" alt="Search" hspace="3" />Search</a>&nbsp; &nbsp;<a href="faq.php?sid=a6d82bbd3eaaaf99d0ab63195146a249" class="mainmenu"><img src="templates/push/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="FAQ" hspace="3" />FAQ</a></span> <span class="copyright"><br> 
            Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> &copy; 2001, 2005 phpBB Group<br /> 
            </span></div> 
    </div> 
    </body>
    </html>
    It works here

  3. #3
    SitePoint Addict
    Join Date
    Mar 2004
    Posts
    260
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmm, no that did not work. (You just removed the unnamed DIVs and added the <p> </p> tags, right?

    Now It's all plain tables following each other. Why on earth would the one be on the left?!

  4. #4
    SitePoint Addict
    Join Date
    Mar 2004
    Posts
    260
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    [bump]
    _

  5. #5
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,556
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    You need to add clear:here:

    Code:
     <div align="center"> 
       <div align="left" id="main"> 
      <table width="700" cellspacing="0" cellpadding="2" border="0" align="left">
    	<tr> 
       <td align="left" valign="bottom"><span class="nav"><a href="index.php?sid=f560e1aae7d3f5c44c4ce06becfa39e0" class="nav">home</a></span></td>
       <td align="right" valign="bottom" class="gensmall"> <a href="search.php?search_id=unanswered&amp;sid=f560e1aae7d3f5c44c4ce06becfa39e0" class="gensmall">View 
    	 unanswered posts</a></td>
    	</tr>
      </table>
      <table style="clear:both" width="700" cellpadding="2" cellspacing="1" border="0">
    	<tr> 
       <th colspan="2" class="thCornerL" height="25" nowrap="nowrap"><div align="left">&nbsp;Forum&nbsp;</div></th>
       <th width="50" class="thTop" nowrap="nowrap">&nbsp;Topics&nbsp;</th>
       <th width="50" class="thTop" nowrap="nowrap">&nbsp;Posts&nbsp;</th>
       <th class="thCornerR" nowrap="nowrap">&nbsp;Last Post&nbsp;</th>
    	</tr>

  6. #6
    SitePoint Addict
    Join Date
    Mar 2004
    Posts
    260
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lovely, thanks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •