/    Sign up×
Community /Pin to ProfileBookmark

Prevent data from overflowing?

Hello! I have a pagination script retrieving 6 rows per page, but the problem is that it’s putting the rows straight up and down, on top of each other. My table is 563px tall, and 352px wide, and I want it to display 3 rows on one half, and the other 3 on the other. How would I do that? I don’t know if there’s some attribute to not let data get out of the table, or what.

I posted this in PHP only because I’m not sure which language the solution would be in.

Here’s the output of the pagniation:

[code=php] while($item = mysql_fetch_assoc($rs)) {
?><table border=”0″ style=”position:relative;”><tr><td wdith=”10px”></td><td>
<img src=”<? echo(“$item[url]”);?>”></td><td> <b><? echo(“$item[furni]”);?></b><BR>
<? echo(“$item[price]”);?> Credits</td></tr></table>

<? }[/code]

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@tirnaJul 05.2010 — I would do something like this:

1) Have 2 tables with about 50% width each, inside the one container.

2) Inside the container float 1 table left, the other float right.

3) Write the first 3 records in your result set to the left table and the final 3 results to the right table.
×

Success!

Help @Sing spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...