/    Sign up×
Community /Pin to ProfileBookmark

center text problem

im unsure if this is right for the HTML thread, but since it’s a HTML problem im posting here.

i have this code bellow where im trying to center the text from <? include ‘includes/toptoday.php’; ?> it works in firefox but when i try to force it center so it’s also centerd in Internet explorer it wont work and wont center itself while all other test / include files are centerd, anyone know why ? :/

[CODE]<div align=”center”>

<table border=”0″ cellpadding=”0″ cellspacing=”0″ style=”border-collapse: collapse” bordercolor=”#111111″ width=”820″>
<tr>
<td width=”820″><? include ‘header.php’?><br>

<table class=”body1″ border=”0″ cellpadding=”0″ cellspacing=”0″ style=”border-collapse: collapse” bordercolor=”#111111″ width=”820″>
<tr>
<td width=”820″><center>Tip: <i><br>Here is a list of the top users for today!</center><br><br><center><? // include ‘includes/userpanel.php’?></center><center><? include ‘includes/toptoday.php’; ?><br><br></td></center>
</tr>
</table><center>
<?/****/ include ‘includes/footer.html’; ?>
<br><br></td>
</tr>
</table>
</div>
</center>[/CODE]

to post a comment
HTML

10 Comments(s)

Copy linkTweet thisAlerts:
@ryanbutlerDec 25.2007 — Hard to say without all the code, but you shouldn't need to use <center> at all. Use center on the <td> tag containing the include.
Copy linkTweet thisAlerts:
@evaniaauthorDec 25.2007 — Hard to say without all the code, but you shouldn't need to use <center> at all. Use center on the <td> tag containing the include.[/QUOTE]

bellow is the code from the php file, before it there is a mysql query and this code comes after it, then there is nothing more. i cant figure out why it wont center in IE! :/

[CODE]<? if ($added=="false") { ?><td width="70"

align="center">
<a target="_blank" class="add" href="<? echo

PROFILE_ADD . $rowsSet['fid']?>"><img class="picture" src="<? echo

IMAGE_PATH.$rowsSet['image']?>"></a><br> <a target="_blank" class="add" href="<? echo PROFILE_ADD .

$rowsSet['fid']?>"><b>Add</b></a> | <a target="_blank" class="add" href="<? echo PROFILE_VIEW .

$rowsSet['fid']?>"><b>View</b></a><br>
<? // echo $rowsSet['dname']?>
Points: <strong><? echo

$rowsSet['today_points']?><br></strong><? } ?></td>[/CODE]
Copy linkTweet thisAlerts:
@evaniaauthorDec 25.2007 — i forgot to add that <? include 'includes/toptoday.php'; ?> is the only file that do not line up, can anyone se why just that one would not line up in the codes above ? ?
Copy linkTweet thisAlerts:
@WebJoelDec 25.2007 — ...<? include 'includes/toptoday.php'; ?>...([/QUOTE] -Educate me: I thought server-side includes were written more like <!--#include virtual="/footer.php" -->, etc... I really don't know. ?
Copy linkTweet thisAlerts:
@ryanbutlerDec 26.2007 — can anyone see why just that one would not line up in the codes above ?[/quote]

No. Can you give us an example of the output, such as a URL to a web page?

-Educate me: I thought server-side includes were written more like <!--#include virtual="/footer.php" -->, etc... I really don't know.[/quote]

Your include is for ASP. He's trying to call an include using the PHP method.
Copy linkTweet thisAlerts:
@Major_PayneDec 26.2007 — PHP Include: [CODE]<?php
include("/path/to/your/included/files/somefile.php");
?>[/CODE]


ASP Include: [CODE]<!--#include virtual="somefilename"-->[/code]

or

[code]<!--#include file ="somefilename"-->[/CODE]

I think I got this straight now. ?

Ron
Copy linkTweet thisAlerts:
@WebJoelDec 27.2007 — <!--#include virtual="somefilename"[B]-->[/B][/QUOTE] -Doesn't this need to be '[B][I]whitespace[/I]-->[/B]'? ( " [B]-->[/B]" )

I've really go to learn all this. ?
Copy linkTweet thisAlerts:
@Major_PayneDec 27.2007 — Not sure if it would make a difference or not, but I do use it the way you indicated with whitespace. Actually used on one of my root directory pages: [CODE]<!--#include file="a_head_tags2.html" -->[/CODE]

Will try it both ways when I get time to see if it will work. I've still got so much to learn and not enough time left to do so.

Ron
Copy linkTweet thisAlerts:
@ryanbutlerDec 27.2007 — Whitespace shouldn't make a difference in the ASP world. I've never had a problem with it in the PHP world either that I can recall.
Copy linkTweet thisAlerts:
@Major_PayneDec 28.2007 — Thanks. Will save me from testing it. LOL

Ron
×

Success!

Help @evania 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 4.18,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

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