Div werkt geen 2 keer?

Gestart doorSanderc8 reacties20 weergaven

9 berichten · pagina 1 van 1

Sanderc

Lid · Topicstarter

Berichten
11.263
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hallo,

Ik zit dit nu al een week uit te pluizen, maar het lukt me niet.
Ik wil nu echt verder kunnen met mijn project dus help me aub emo
Je ziet dat het tweede artikel (het bovenste, het nieuwste staat vanboven), de inhoud van het bericht uit zijn vak loopt, maar het is nochtans gewoon dezelfde div in de PHP.

http://sander.vanmarijn.nl/

Ik zie nu net in de pagina bron dat die gewoon in geen div staat, maar omdat het systeem niet door mijzelf gemaakt is, is het moeilijk om er divs in te voegen.

Wie me kan helpen krijgt een beloning van 0,1 punt heart
0
Berichten
3.112
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Het staat nieteens in een div?
0
Sanderc

Lid · Topicstarter

Berichten
11.263
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik zag het net ook...

Maar het is toch zo ingesteld?

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/class"]class[/URL] show[COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] belangrijk[COLOR= #007700](){[/COLOR]
        [COLOR= #0000BB]$sQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM system_news WHERE nStick = 1 ORDER BY nDatum DESC"[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sQuery[/COLOR][COLOR= #007700])){[/COLOR]
            [COLOR= #0000BB]$rQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM system_reacties WHERE rNieuws = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$sFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nId[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
            [COLOR= #0000BB]$rRows[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$rQuery[/COLOR][COLOR= #007700]);[/COLOR]
            
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="titel"><a href=[/COLOR][COLOR= #007700].[/COLOR]_ROOT_[COLOR= #007700].[/COLOR][COLOR= #DD0000]news.php?n=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$sFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"nId"[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]><b>[/COLOR][COLOR= #007700].[/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$sFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nOnderwerp[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]</b></a>[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]])){[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]" - <a href="[/COLOR][COLOR= #007700].[/COLOR]_ROOT_[COLOR= #007700].[/COLOR][COLOR= #DD0000]"admin/index.php?del="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$sFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nId[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]">Verwijder</a></div>"[/COLOR][COLOR= #007700];
            }[/COLOR]
            [URL="http://www.php.net/else"]else[/URL]
            [COLOR= #007700]{[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]</div>[/COLOR][COLOR= #007700];
            }[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="date"><i>Op [/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"d-m-Y om H:i:s"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nDatum[/COLOR][COLOR= #007700]])).[/COLOR][COLOR= #DD0000], door [/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/ucfirst"]ucfirst[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"nDoor"[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]</i><br /></div>[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/strlen"]strlen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nBericht[/COLOR][COLOR= #007700]]) >[/COLOR] _LETTERS_[COLOR= #007700]){[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="date">[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/substr"]substr[/URL][COLOR= #007700]([/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$sFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nBericht[/COLOR][COLOR= #007700]]),[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR] _LETTERS_[COLOR= #007700]).[/COLOR][COLOR= #DD0000]...</div>[/COLOR][COLOR= #007700];
            }[/COLOR]
            [URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$sFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nBericht[/COLOR][COLOR= #007700]]);
            }[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="bareind"><i>[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/number_format"]number_format[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"nViews"[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]","[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"."[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]x bekeken en [/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/number_format"]number_format[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$rRows[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]","[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"."[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000] reacties</i></div>[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<br /><hr />"[/COLOR][COLOR= #007700];
        }
    }[/COLOR]
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Je eerste zinnetje zet je niet in een div, je tweede zinnetje zet je in de "date" div, die als eigenschappen heeft dat er randen om komen en die in het midden staat.

strlen($sFetch[nBericht]) > _LETTERS_

Dit is bij het eerste bericht niet waar, dus voert ie de else uit, waar je geen div er omheen zet.

Trouwens, je Classenopzet is volgens mij echt helemaal fout sadley
0
Sanderc

Lid · Topicstarter

Berichten
11.263
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Aahn ja bedankt, ik had net ook door dat het daar aan kon liggen.

En ik heb btw het systeem niet zelf gemaakt, het van Eleky, ik gebruik het maar bouw het om...

Als ik het zelfgemaakt had, had ik al die fouten niet, want nu moet ik eerst alles uitpluizen.

Ik stuur je de 0,1 punt even op.
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
kijk eens in je vorige topic hierover daar staat allang de oplossing aah
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Niet dat ik de 0.1 nodig heb, maar bedankt.

@ Marjolein: Welk ander topic?
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Marjolein schreef:
Aha, niet gezien. Is inderdaad niet zo netjes.
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren