div text probleem

Gestart doorShahiem4 reacties40 weergaven

5 berichten · pagina 1 van 1

Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hoe kan ik ervoor zorgen dat de tekst een stuk van het plaatje afgaat zonder dat het plaatje meegaat?

PHP code:

[COLOR= #0000BB]<?php
$sQuery1[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM member_news WHERE uCat = Habboregio AND nVisible = 1  AND nHeadlines = aan ORDER BY nId DESC LIMIT 1"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$sFetch1[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sQuery1[/COLOR][COLOR= #007700]);
    {[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="vak">[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$nameQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT uName, uCol FROM member_accounts WHERE uId = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$sFetch1[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nAuthor[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$nameFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$nameQuery[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<img src="[/COLOR] [COLOR= #007700].[/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$sFetch1[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nAfbeelding[/COLOR][COLOR= #007700]]).[/COLOR] [COLOR= #DD0000]" style="float:left;" alt="[/COLOR] [COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$sFetch1[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nTitle[/COLOR][COLOR= #007700]],[/COLOR] ENT_QUOTES[COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]" /><strong>[/COLOR] [COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$sFetch1[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nTitle[/COLOR][COLOR= #007700]],[/COLOR] ENT_QUOTES[COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]</strong><br />[/COLOR] [COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$sFetch1[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nKort[/COLOR][COLOR= #007700]],[/COLOR] ENT_QUOTES[COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]<br /><br />[/COLOR][COLOR= #007700];[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<a href="/nieuws?act=leesmeer&amp;id=[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$sFetch1[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nId[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]">
        Lees meer</a><br />[/COLOR][COLOR= #007700]; 
    }[/COLOR]   
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]</div>[/COLOR][COLOR= #007700];[/COLOR]    
?>


CSS:

#vak{
    float: left;
    height: 61px;
    width: 220px;
    color:#FFF;
    margin-left: 4px;
    margin-top: 4px;
}
0
Berichten
4.451
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
dat hij uitrekt bedoel je?
snap het niet helemaal maar voor uitrekken doe je dit:

#vak{
    float: left;
    width: 220px;
    color:#FFF;
    margin-left: 4px;
    margin-top: 4px;
}
0
Berichten
6.144
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
of

height: auto
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Niet uitrekken , ik wil dat er naast het plaatje een klein stukje ruimte komt en daarna tekst.
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
het plaatje in een class (css) zetten en een padding meegeven smile
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