Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 40

Thread: php with css..

  1. #11
    Join Date
    May 2006
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    so i changed the div name to limitor img and it still does the same thing?

    from <div id="limitor">

  2. #12
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    No, don't change the id of the div container. What I wrote with css (#limitor img) targets all the images in the limitor container. All you need to do is add that part to your css.
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

  3. #13
    Join Date
    May 2006
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    so
    Code:
    #limitor {
    width:200px;
    }
    #limitor img {
    float:left;
    }
    Last edited by Snookerman; 04-22-2009 at 08:45 AM. Reason: added [code] tags

  4. #14
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Yes, and the container show be <div id="limitor">.
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

  5. #15
    Join Date
    May 2006
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    lol same thing...

    what i dont get is this is being used
    Code:
    #limitor {
    width:200px;
    }
    #limitor img {   but this no?it should be in the div no?
    float:left;
    }
    Last edited by Snookerman; 04-22-2009 at 08:45 AM. Reason: added [code] tags

  6. #16
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    I just looked at your code and I see you totally misunderstood what we meant. You have each image inside a div container and each div container is inside a table cell. You also have a break after each image. I'm going to rewrite your code so you get rid of the table, get your problem fixed and get rid of all that unuseful code.

    Replace the table you have now that has the images with this:
    HTML Code:
    <div id="wrapper"><a href="http://softcoredesign.com/admin/art/pepe_bus.jpg" target="_blank"><img src="http://softcoredesign.com/admin/art/pepe_bus.jpg" alt=""  /></a><a href="http://softcoredesign.com/admin/art/bighed_with_logo.jpg" target="_blank"><img src="http://softcoredesign.com/admin/art/bighed_with_logo.jpg" alt=""  /></a><a href="http://softcoredesign.com/admin/art/book_cover666rgb_red.JPG" target="_blank"><img src="http://softcoredesign.com/admin/art/book_cover666rgb_red.JPG" alt=""  /></a><a href="http://softcoredesign.com/admin/art/chicken_logo.jpg" target="_blank"><img src="http://softcoredesign.com/admin/art/chicken_logo.jpg" alt=""  /></a><a href="http://softcoredesign.com/admin/art/pepe%20_pin.jpg" target="_blank"><img src="http://softcoredesign.com/admin/art/pepe%20_pin.jpg" alt=""  /></a><a href="http://softcoredesign.com/admin/art/virgin_mary%20001.jpg" target="_blank"><img src="http://softcoredesign.com/admin/art/virgin_mary%20001.jpg" alt=""  /></a><a href="http://softcoredesign.com/admin/art/pepe_tech_blue.jpg" target="_blank"><img src="http://softcoredesign.com/admin/art/pepe_tech_blue.jpg" alt=""  /></a><a href="http://softcoredesign.com/admin/art/punk_chick_collage.jpg" target="_blank"><img src="http://softcoredesign.com/admin/art/punk_chick_collage.jpg" alt=""  /></a><a href="http://softcoredesign.com/admin/art/pepe_tech_oner_text.jpg" target="_blank"><img src="http://softcoredesign.com/admin/art/pepe_tech_oner_text.jpg" alt=""  /></a><a href="http://softcoredesign.com/admin/art/card_design_one.jpg" target="_blank"><img src="http://softcoredesign.com/admin/art/card_design_one.jpg" alt=""  /></a><a href="http://softcoredesign.com/admin/art/space_the_final_frontier.jpg" target="_blank"><img src="http://softcoredesign.com/admin/art/space_the_final_frontier.jpg" alt=""  /></a></div>
    Then replace the css code you have now with this:
    HTML Code:
    <style type="text/css">
    body {
    	background-color:#CCCCCC;
    }
    #wrapper {
    	width:476px;
    }
    #wrapper img {
    	width:115px;
    	border:none;
    	margin:2px;
    }
    </style>
    As you can see in the css, I made all the images 115px wide, I removed their borders and I gave them a 2px margin on each site so they wouldn't be to close to each other, but you can remove that if you want. I made the wrapper 476px wide because that is the width of 4 images plus the padding they each have on the left and the right side.
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

  7. #17
    Join Date
    May 2006
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    sorry i feel lost..lol i cant get the div to work it deforms my page?

    PHP Code:
    <?php
    // database connect script. 

    mysql_connect("localhost""techker_techker""techker") or die(mysql_error()) ;
    mysql_select_db("techker_softcore") or die(mysql_error()) ;

    $fileSQL=" SELECT *
    FROM featured 
    "
    ;
    $fileLIST=mysql_query($fileSQL);

    $fileSQL2=" SELECT *
    FROM featured WHERE location=2
    "
    ;
    $fileLIST2=mysql_query($fileSQL2);

    $fileSQL3=" SELECT *
    FROM featured WHERE location=3
    "
    ;
    $fileLIST3=mysql_query($fileSQL3);

    $fileSQL4=" SELECT *
    FROM featured WHERE location=4"
    ;
    $fileLIST4=mysql_query($fileSQL4);

    $fileSQL5=" SELECT *
    FROM featured WHERE location=5
    "
    ;
    $fileLIST5=mysql_query($fileSQL5);

    $fileSQL6=" SELECT *
    FROM featured WHERE location=6
    "
    ;
    $fileLIST6=mysql_query($fileSQL6);

    $fileSQL7=" SELECT *
    FROM featured WHERE location=7
    "
    ;
    $fileLIST7=mysql_query($fileSQL7);

    $fileSQL8=" SELECT *
    FROM featured WHERE location=8
    "
    ;
    $fileLIST8=mysql_query($fileSQL8);

    $fileSQL9=" SELECT *
    FROM featured WHERE location=9
    "
    ;
    $fileLIST9=mysql_query($fileSQL9);


    ?>



    <html>
    <head>
    <title>index</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    <!--
    body {
        background-color: #CCCCCC;
    }
    #wrapper {
        width:476px;
    }
    #wrapper img {
        width:115px;
        border:none;
        margin:2px;
    }

    -->
    </style></head>
    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <!-- ImageReady Slices (index.psd) -->
    <table width="900" height="901" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
    <tr>
            <td colspan="5">
                <img src="images/main_01.jpg" width="900" height="15" alt=""></td>
        </tr>
        <tr>
            <td colspan="2" rowspan="4">
                <img src="images/main_02.jpg" width="591" height="376" alt=""></td>
            <td colspan="2">
                <img src="images/main_03.jpg" width="300" height="57" alt=""></td>
            <td rowspan="6">
                <img src="images/main_04.jpg" width="9" height="885" alt=""></td>
        </tr>
        <tr>
            <td colspan="2">
                <img src="images/main_05.jpg" width="300" height="49" alt=""></td>
        </tr>
        <tr>
            <td colspan="2">
                <img src="images/main_06.jpg" width="300" height="51" alt=""></td>
        </tr>
        <tr>
            <td colspan="2">
                <img src="images/main_07.jpg" width="300" height="219" alt=""></td>
        </tr>
        <tr>
            <td rowspan="2">
                <img src="images/main_08.jpg" width="378" height="509" alt=""></td>
            <td colspan="2"><table width="502" height="415" border="0" cellpadding="0" cellspacing="0">
              <tr><? while ($row = @mysql_fetch_assoc($fileLIST)) { ?>
                <th width="501" height="415" valign="top" background="images/main_09.jpg" scope="row"><table width="500" height="415" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                </table></th>
              </tr><? ?>
            </table></td>
      <td rowspan="2">
                <img src="images/main_10.jpg" width="11" height="509" alt=""></td>
        </tr>
        <tr>
            <td colspan="2">
                <img src="images/main_11.jpg" width="502" height="93" alt=""></td>
        </tr>
        <tr>
            <td>
                <img src="images/spacer.gif" width="378" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="213" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="289" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="11" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="9" height="1" alt=""></td>
        </tr>
    </table>
    <!-- End ImageReady Slices -->
    </body>
    </html>
    i fixed the top.

  8. #18
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    I'm sorry to say but your page is very poorly written, you used tables for design and spacer gifs. That makes it very slow and also very, very difficult to change anything. I suggest you think about rewriting it all. You don't seem to have done so much yet so it shouldn't be a problem to rewrite it. Trust me, doing it now will save you a lot of time in the future. Read this article to see why:
    http://www.hotdesign.com/seybold/everything.html

    If you decide to rewrite it I'll be happy to help you out, but as it looks at the moment, I'm afraid there's not much I can do without spending my entire day on it.

    After you've read the article, if you don't know how to start, post a link to the entire background picture you want to use and I'll show you how to get the same effect without having to go to any trouble at all.
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

  9. #19
    Join Date
    May 2006
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    well thx for the help.i always use photoshop and dreamweaver .

    anyways i will figure it out..lol

  10. #20
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    post the whole php your using for that image script. The first one you posted only looked like a part of it because it looks like to me atleast that there is a for or while loop thats writing each image and if so the div limitor should be placed outside of that

Tags for this Thread

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
  •