www.webdeveloper.com
Results 1 to 2 of 2

Thread: Alignment issue with firefox..

  1. #1
    Join Date
    Apr 2007
    Posts
    3

    Alignment issue with firefox..

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    </head>
    <body>
    <p style=font-size=17px; face-name="Arial"; ><Span style="margin-right:12px; margin-bottom:40px; float:left;width:290px;height:222px;">
    <img src="images/aupiece1.jpg"  width="270" alt="" border="0" align=""   
    style="border:1px solid black;">
    </span>Text and more text.</p>
    			
    </body>
    Ok, I use this in IE6 , its fine, its perfect, its just what they want, then bam, they ask me why its not working under FireFox. I guess its the DocType, but I havent got a clue what to change it to or even if its that. FireFOx does its own little thing, I need this thing for IE and FF. Any ideas?

    Thanks,
    RYan

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,604
    Start by using a fully qualified doctype. Make sure you quote the text being used as the value of your style attribute, and note that there is no style property named "face-name". Also, you used a "=" after 'font-size' instead of ":".
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html lang='en'>
    <head>
    <meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-1'>
    <title>Page Title</title> <!-- title is a required element -->
    </head>
    <body>
    <p style="font-size:17px; font-family: Arial, sans-serif;">
    <span style="margin-right:12px; margin-bottom:40px; float:left;width:290px;height:222px;">
    <img src="images/aupiece1.jpg"  width="270" alt="" style="border:1px solid black;">
    </span>Text and more text.</p>
    </body>
    </html>
    Be sure to validate your HTML. If it's not valid, all bets are off as far as how different browsers will try to display it.
    Last edited by NogDog; 04-27-2007 at 10:05 PM.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles