SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast Incubator's Avatar
    Join Date
    Apr 2002
    Location
    Good old Belgium
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    weird div alignment

    i have some werid effect when drawing multiple divīs undereach other.
    take a look at http://www.incubator.dynu.com/Elynduil/dbtest.php

    each message box is dynamically written, so hereīs the code for one of those things:
    Code:
    <div id="Layer18" style="position:absolute; left:315px; top:240px; width:280px; height:174px; z-index:23;
     background-color: #AFDBFF; layer-background-color: #F5F5F5; border: 1px none #000000;"><img src="images/topmenu2.gif" width="334" height="25"> 
      <div id="Layer19" style="position:absolute; width:1px; 
    height:150px; z-index:1; background-color: #647480; layer-background-color: #647480; border: 1px none #000000; left: 0px; top: 25px"></div> 
    
      <div id="Layer19" style="position:absolute; width:1px; height:150px; z-index:1; background-color: #647480; layer-background-color: #647480; border: 
    1px none #000000; left: 333px; top: 25px"></div>
      <div id="Layer20" style="position:absolute; width:334px; height:1px; z-index:2; background-color: #647480; layer-background-color: #647480; border: 
    1px none #000000; left: 0px; top: 174px"><img src="transparent.gif" width="1" height="1"></div>
    <div align="left" class="datum"><b>'.$row['datum'].'</b></div>
    <br><div align="left" class="mtext">'.$row['boodschap'].'</<div>
    Iīve tried aligning them to center or left to make them form a nice column, but it wonīt work.
    Also I had to set the height of that dark-blue area to 80% because those divīs wouldnīt place themselves in it.
    Wich is very strange because at another page, with a similar div style, it does work.
    btw, those classes i used are just dealing with the fonts and text properties
    Anyone who can help me with this?
    "Press any key to continue. Press any other key to exit."

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

    In the code on your page you have six (i think) ending divs missing i.e </div>. Try sorting them out first and then the problem may be easier to solve or may even solve itself.

    You have a couple of divs written like this </<div> instead of </div>.

    Hope this helps.

  3. #3
    SitePoint Enthusiast Incubator's Avatar
    Join Date
    Apr 2002
    Location
    Good old Belgium
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    all divīs where closed prperly, but thnx for noting that typo out
    didnt see that one, but sadly enough it didnīt really fix it
    "Press any key to continue. Press any other key to exit."

  4. #4
    SitePoint Enthusiast Incubator's Avatar
    Join Date
    Apr 2002
    Location
    Good old Belgium
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm, iīll think iīll rewrite it and remove those fixed positions for the top. maybe thatīll help.
    "Press any key to continue. Press any other key to exit."

  5. #5
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    BTW, "layer-background-color" is not a CSS attribute. Also, you have "1px none #000000" as your border style. If you want a 1px line use this:
    Code:
    border: 1px solid #000;
    If you want no border at all, use this:
    Code:
    border: none;


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
  •