Jul 26, 2008

Problem With Firefox Text Alignment

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming

free web hosting

Problem With Firefox Text Alignment

kvarnerexpress
I just have a really simple annoyin prob with my site which I have only just noticed. If i view the site in IE the alignment is fine but when in Firefox it isnt properly aligned.
The user searches the db and it returns a table with the results..


PHP Code:
CODE
echo '<br><table width="871" border="0" align="center" cellpadding="0" cellspacing="0"><tr><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><strong>'; echo 'Artists beginning with '.$alphaletter. '<th><table border="1"  width="250" align="left"><br><tr align="left"><th>Artist</th></font></strong></tr>';


IE reads this as the echo "Artists.. " bit within the table but Firefox puts the "Artists.." part outside and so then its tight against the left side instead of indented. I have tried CSS but it doesnt seem to b working..all my other css works fine just not this. Can anyone suggest a way round it?

Thanks,kvarnerexpress

 

 

 


Reply

truefusion
Um, you may wanna try fixing up your HTML coding. It's all totally whack. I dont know how Internet Explorer was able to figure out what you want, but i had trouble. I removed the Table Header tag, and placed in some Table Data tags. I've also moved some other tags where they belonged.

Try This:
CODE

echo '
<br>
<table border="0" width="871" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">
<strong>
Artists beginning with'  .$alphaletter. '
</strong>
</font>
<table border="1" width="250" align="left">
<tr>
<td align="left">
Artist
</td>
</tr>
</table>
</td>
</tr>
</table>
';

 

 

 


Reply

arboc7
I agree with truefusion...it is really hard to see what you are trying to do. Try truefusion's code, it should work for you.

I would also suggest that you consider ditching tables. They are really messy, especially with new CSS that is more powerful than tables. I would also suggest that you use "semantic" markup--use only tags for structure, and then only when that is the best tag to use--then almost all browsers will read your HTML and CSS correctly (or however you intend it to be read).

Good Luck and good coding!! smile.gif


Reply

alexia
U can use this
<?php
Print (" your html code just change " to ' like : <a haref='yahoo.com'>yahoo<a>");
?>

With fire fox and ie and any browser you can view at local and then upload your file
i think IE vs Firefox in Tabels
Its really hard to show one page correctly in IE and firefox
i think this discrepancy in IE and firefox in Time to Read Html tags blink.gif

Reply

Tyssen
QUOTE(alexia @ Oct 12 2005, 11:06 AM)
Its really hard to show one page correctly in IE and firefox

Not if you know what you're doing.

Reply

vitrus
C'm on guys.. we are NOT living in the 90'ies anymore...

a <table> icw align=center is NOT ALLOWED

besides, he was talking about TEXT alignment.. so, how about:

[CODE]CSS
td.mystyle
{
text-align: center;
width: 871;
padding: 0;
}

HTML

<td class="mystyle">
yadda yadda
</td>

Reply

cragllo
The font tag is not exactly valid HTML any more. use something better like span

e.g
CODE
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;">   </span>
Much better!

Reply

Tyssen
QUOTE(cragllo @ Oct 27 2005, 03:46 AM)
The font tag is not exactly valid HTML any more. use something better like span

It depends on the situation. <span> is an inline tag and should only be used inside block level elements to achieve different styles within a larger style. For instance, if you have a sentence in black but you want some words blue, you'd do this:

CODE
<p style="color: black;">Your sentence goes here with <span style="color: blue;">these words in blue</span>.</p>

Spans shouldn't be used to contain blocks of content by themselves, ie whole paragraphs - that's what <p> is for.

Reply

waterfoul
use
CODE
echo '<br><table width="871" border="0" align="center" cellpadding="0" cellspacing="0"><tr><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><strong>'; echo 'Artists beginning with '.$alphaletter.'<th><table border="1"  width="250" align="left"><br><tr align="left"><th>Artist</th></font></strong></tr>';

instead of this
CODE
echo '<br><table width="871" border="0" align="center" cellpadding="0" cellspacing="0"><tr><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><strong>'; echo 'Artists beginning with '.$alphaletter. '<th><table border="1"  width="250" align="left"><br><tr align="left"><th>Artist</th></font></strong></tr>';
maby thatll work, white space can be bothersome

Notice from cmatcmextra:
Fixed code tags

Reply

Tyssen
QUOTE(waterfoul @ Oct 27 2005, 01:09 PM)
use
CODE
echo '<br><table width="871" border="0" align="center" cellpadding="0" cellspacing="0"><tr><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><strong>'; echo 'Artists beginning with '.$alphaletter.'<th><table border="1"  width="250" align="left"><br><tr align="left"><th>Artist</th></font></strong></tr>';[/cpde]
instead of this
[code]echo '<br><table width="871" border="0" align="center" cellpadding="0" cellspacing="0"><tr><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><strong>'; echo 'Artists beginning with '.$alphaletter. '<th><table border="1"  width="250" align="left"><br><tr align="left"><th>Artist</th></font></strong></tr>';
maby thatll work, white space can be bothersome

You've just copied exactly the same thing and haven't changed anything. rolleyes.gif

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. firefox text & html issue - 1.00 hr back. (1)
  2. firefox tables align left - 2.09 hr back. (1)
  3. cellspacing not working yahoo beta - 15.98 hr back. (1)
  4. font tag and strong tag not working php - 17.77 hr back. (1)
  5. firefox font alignment problem - 33.77 hr back. (1)
  6. span text alignment is not working in firefox - 37.01 hr back. (1)
  7. css text-alignment: center firefox - 38.42 hr back. (1)
  8. text align in php - 43.24 hr back. (1)
  9. script alignment in firefox - 45.16 hr back. (1)
  10. firefox 3 problem align css rounding - 51.57 hr back. (1)
  11. center align paragraph firefox - 75.06 hr back. (1)
  12. html code firefox left alignment - 80.68 hr back. (1)
  13. firefox 3 center text in table - 86.97 hr back. (1)
  14. firefox text-align:center problem - 87.08 hr back. (1)
Similar Topics

Keywords : problem, firefox, text, alignment

  1. Mozilla Out With Firefox 3 Beta 4
    The beta 4 version of FireFox 3 is out .. (1)
  2. I Just Wrote A Script For A Php Text Editor!
    (8)
    Yes, I just wrote out a script for a PHP text editing program. It is very basic but I would like to
    be able to actually use this and update it. First, I need version 0.7 to be proofread. It will be
    upgraded to 0.8 after closed beta, 0.9 after open beta, 1.0 when ready. I would love to have some
    people help with this project. Right now it is a simple PHP script and HTML form. Here is the
    current script. I would like it to be proofread. $fileName = "$_REQUEST ";
    $fHandle = fopen($fileName , 'w') or die("Can't write file."); $fCont....
  3. Php Text Editor
    (1)
    Is there any possible way using XML and PHP that you could create a text editor that can save files
    in your documents and also make a hotlink to your site. Much like a online notepad. I would like to
    know how I would make on of these and whether or not MySQL or XML would be a good language to use
    for storing data. My current idea deals with only PHP and iframes. It really isn't an editor
    though, more like a notes page. I would like a way though to be able to create a database with info
    stored from the PHP script which and be able to save to your hard drive. Also, i....
  4. [php]simple Flat File Text Manipulator
    Example on how to use forms to write to files in PHP (3)
    I made a simple flat file text editor, that can show you probably how simple it is to use forms with
    php and write that data to file. This example has 2 files, submit.php, and postit.html. Submit.php
    is used to write title, and some text, and add html tags, and paragraph tags where new paragraphs
    are. Here's the file with comments. I think that HTML really doesn't need some more
    explaining. CODE Title: <br /> <input type="text"
    name="title" size="53"> <br /> Text: <br />
    <textarea nam....
  5. Forms, Text Files, And Php For A Signature Generator.
    Help a little. (1)
    Hello everyone! I am in need of some code a for a signature generator I am making. I am using
    BuffaloHELP's code for the php file, now I am trying to improve that code by making a form in a
    html file that will have the user say what is on the sig! But now, I need help getting the form
    data that is posted by the user to get into that sig! There is a file, sig.txt, where that tells
    the php file what text will go on the sig. But how can I make the form data in the html file go into
    the text file so it will go onto the sig? You might want to read BuffaloHELP&....
  6. Help Php: How To Load String From Text File (solved)
    Loading string from text file when you click on your link (9)
    I learned the way to load other files with the code posted on this forum. Now i wanted to try
    something for my side menu. I am calling this a string, --> $tekst , maybe it's
    called something else i'm not sure Now let's say i have a file called details.txt In that
    file i would like to have something like this $detailsaboutphp1 = ("details details details
    1"); $detailsaboutphp2 = ("details details details and even more details 2"); How to make a
    code that loads those $strings on click of a mouse. When we tried to load extern....
  7. Form Dosn't Submit In Opera
    Works in IE and FireFox (1)
    My form dosn't submit, it works in IE and FF, its validated HTML 4.01 and all, Code:
    /**********************************/ /** Post Topic :: EvilBoard **/
    /**********************************/ /* Session Start */ session_start(); /* Start Submit Script */
    if ( isset($_POST )) { header("Refresh: 0; redirect.php?posttopic");
    define("RELOADED","YES"); } /* End Submit Script */ /* Include File::Header.php */
    include("include/header.php"); echo " "; /* If Script can't find SESSION user_name */ if (
    !$_SESSION ) { /* Echo :: Forbiden */ echo '....
  8. String/text Formatting?
    (4)
    right i was wondering if someone could help me with this: I notice on this site if i make a topic
    for example WAppY rOCks WaP, it will come out like Wappy Rocks Wap. I also want to do this to my
    forums, can anyone give me the code to format a string of text in this way? THANKS IN ADVANCE ....
  9. Simple Text Counters
    Counters i use on wap sites ;-) (15)
    First create a dir "counters" in root add to it dailyhits.txt, hits.txt, online.txt an CHMOD 0777,
    place this on index: CODE //online counter $tim = 120+time(); $time =
    time(); $f = "counters/online.txt"; $nusk = file($f);
    $sk = count($nusk); $in = $HTTP_USER_AGENT.$REMOTE_ADDR; $fp =
    fopen($f, "w+"); for($i=0; $i<$sk; $i++) {
    list($nix, $timf) = explode("|", $nusk[$i])....
  10. Dynamic Image / Signature Generator
    a simple code to change text on an image (12)
    In search of dynamically changing quote, saying or all other types of text on an image I came across
    a code that I have modified to fit my initial usage. This procedure requires two files and short
    knowledge of PHP. If you are familiar with Trap17's sig rotation code you will understand this
    procedure very fast. Code 1: dynamic_sig.php (you can rename this to index.php and you'll see
    at the end why) Code 2: a simple text file named anything (I will call it name.txt ) Code 1
    CODE <?php header("Content-type: image/png"); �....
  11. Garbage Text
    when i added php includes to a page (2)
    When i added php included to a page, it produced this really really weird garbage text befor and
    after the table i have on the page. I was wondering if this has ever happened to anyone else. Not
    sure what's producing the gargabe, i mean it's only a couple of characters, and i've
    gone through everything and can't find anything. The other thing is that i can, and have gotten
    rid of it by getting rid of the text befor the php include code which isn't a solution becasue i
    want to keep the meta's and title on the page. this is what the garbage looks li....
  12. Write Random Text To Image
    PHP script help! (5)
    I'm trying to create a script that writes text to an image. CODE
    header("Content-type: image/png"); $_phrases = array( "Test 1",
    "Test 2", "Test 3", "Test 4", "etc." ); $_rand_phrase =
    $_phrases[rand(0,count($_phrases)-1)]; $_image =
    imagecreatefrompng("gmail.png"); $_user_width =
    imaagettfbbox(9,0,"tahoma.ttf",$_rand_phrase); $_x_value =
    (200-($user_width[2] + 113)); ....
  13. Browser Problems, Maybe?
    Firefox vs IE (6)
    Alright, I coded something the other day for the game I am working on making, and a few of my
    friends I allowed to get on it and test things out. Well....the ones that were on IE their
    characters were made but the User variable as in which account they were on just stayed blank, while
    with my friends that were on Firefox, everything worked fine and they could play perfectly... So I
    was wondering, with PHP sql codes being sent to the database, is there something special you have to
    do to make it work on both, or could it be a setting on the IE that was messing with it......

    1. Looking for problem, firefox, text, alignment

Searching Video's for problem, firefox, text, alignment
advertisement



Problem With Firefox Text Alignment



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE