www.webdeveloper.com
Results 1 to 9 of 9

Thread: Html alignment

Hybrid View

  1. #1
    Join Date
    May 2012
    Posts
    3

    Html alignment

    Hey, i have just finished a website for my company www.moderndecoration.ae please see it and tell me how i can align it in center.

    Here is the html code.

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Flash</title>
    <script language="javascript">AC_FL_RunContent = 0;</script>
    <script src="AC_RunActiveContent.js" language="javascript"></script>
    </head>
    <body bgcolor="#141414">
    <!--url's used in the movie-->
    <!--text used in the movie-->
    <!--
    <p align="left"><font face="Tahoma" size="10" color="#333333" letterSpacing="0.000000" kerning="0">Loading...</font></p>
    <p align="left"></p>
    -->
    <!-- saved from url=(0013)about:internet -->
    <script language="javascript">
    if (AC_FL_RunContent == 0) {
    alert("This page requires AC_RunActiveContent.js.");
    } else {
    AC_FL_RunContent(
    'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',
    'width', '1552',
    'height', '1480',
    'src', 'Flash',
    'quality', 'high',
    'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
    'align', 'center',
    'play', 'true',
    'loop', 'true',
    'scale', 'showall',
    'wmode', 'window',
    'devicefont', 'false',
    'id', 'Flash',
    'bgcolor', '#141414',
    'name', 'Flash',
    'menu', 'true',
    'allowFullScreen', 'false',
    'allowScriptAccess','sameDomain',
    'movie', 'Flash',
    'salign', ''
    ); //end AC code
    }
    </script>
    <noscript>
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1552" height="1480" id="Flash" align="center">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="allowFullScreen" value="false" />
    <param name="movie" value="Flash.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#141414" /> <embed src="Flash.swf" quality="high" bgcolor="#141414" width="1552" height="1480" name="Flash" align="center" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    </object>
    </noscript>
    </body>
    </html>


    Regards.

  2. #2
    Join Date
    Feb 2012
    Location
    Bokaro Steel City (Jharkhand), India!
    Posts
    194
    This is the code for centering the web page horizontally!
    HTML Code:
    <div id="wrapper">
        <div id="content">
    <!-- main body content goes here -->
        </div>
    </div>
    HTML Code:
    <style>
        #wrapper {
            margin: 0 auto;
            width: 960px;
        }
        #content {
            width: 100&#37;;
        }
    </style>

  3. #3
    Join Date
    May 2012
    Posts
    3
    Thanks for your reply but i dont know where to put it in my html i have posted complete html source i would really appreciate if you could tell me where to put it in my html code

    regards.

  4. #4
    Join Date
    May 2012
    Posts
    3
    Please guide me where i should put that code in my html source i dont know the location where it should be added i have pasted complete html coding

  5. #5
    Join Date
    May 2012
    Location
    Alaska
    Posts
    13
    You can place center in the body tag, or you can just put it before the body tag and just put <center>

  6. #6
    Join Date
    Nov 2002
    Posts
    2,632
    Quote Originally Posted by Britterzz View Post
    You can place center in the body tag, or you can just put it before the body tag and just put <center>
    Things like <center> and <font> tags have been deprecated since 1999. CSS has replaced those as designers are encouraged to separate formatting from markup.

    Quote Originally Posted by meesam512 View Post
    Thanks for your reply but i dont know where to put it in my html i have posted complete html source i would really appreciate if you could tell me where to put it in my html code

    regards.
    Create a file named styles and save it with an extension of .css. You may have to save it as a "All Files" type to do so. Do not try to save it as a specific file type, ie a text file. Put that file in the same folder as your HTML page.

    Insert this into the styles.css file.
    Code:
    #wrapper {
        margin: 0 auto;
        width: 960px;
    }
    #content {
        width: 100%;
    }
    FYI, any formatting should go in here.

    This is your new <head> tag.

    Code:
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>Flash</title>
        <script language="javascript">AC_FL_RunContent = 0;</script>
        <script src="AC_RunActiveContent.js" language="javascript"></script>
        <link rel="stylesheet" type="text/css" href="styles.css" />
    </head>

  7. #7
    Join Date
    May 2012
    Location
    Alaska
    Posts
    13
    Quote Originally Posted by spufi View Post
    Things like <center> and <font> tags have been deprecated since 1999. CSS has replaced those as designers are encouraged to separate formatting from markup.



    Create a file named styles and save it with an extension of .css. You may have to save it as a "All Files" type to do so. Do not try to save it as a specific file type, ie a text file. Put that file in the same folder as your HTML page.

    Insert this into the styles.css file.
    Code:
    #wrapper {
        margin: 0 auto;
        width: 960px;
    }
    #content {
        width: 100&#37;;
    }
    FYI, any formatting should go in here.

    This is your new <head> tag.

    Code:
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>Flash</title>
        <script language="javascript">AC_FL_RunContent = 0;</script>
        <script src="AC_RunActiveContent.js" language="javascript"></script>
        <link rel="stylesheet" type="text/css" href="styles.css" />
    </head>
    Weird, i just got a certificate for web development and they didn't seem to have a problem with it. So i guess they just want all their styles in css files from now on? sigh that takes forever! lol thanks for letting me know though. Also i am a bit lost now and haven't done any coding in a while, could you show me an easy example of how i would put each style on each part of the page i wanted? such as the header and how id' get it to link to the header, and the content and etc.? thank you
    Last edited by Britterzz; 05-01-2012 at 04:18 PM.

  8. #8
    Join Date
    Feb 2012
    Location
    Bokaro Steel City (Jharkhand), India!
    Posts
    194
    HTML Code:
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    	<title>Flash</title>
    	<script language="javascript">AC_FL_RunContent = 0;</script>
    	<script src="AC_RunActiveContent.js" language="javascript"></script>
    	<style>
    		#wrapper { margin: 0 auto; width: 960px; }
    		#content { width: 100&#37;; }
    	</style>
    </head>
    <body bgcolor="#141414">
    <div id="wrapper"><div id="content">
    <!-- main body content goes here -->
    <!--url's used in the movie-->
    <!--text used in the movie-->
    <!--
    <p align="left"><font face="Tahoma" size="10" color="#333333"  letterSpacing="0.000000"  kerning="0">Loading...</font></p>
    <p align="left"></p>
    -->
    <!-- saved from url=(0013)about:internet -->
    <script language="javascript">
    	if (AC_FL_RunContent == 0) {
    		alert("This page requires AC_RunActiveContent.js.");
    	} else {
    		AC_FL_RunContent(
     			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',
    			'width', '1552',
    			'height', '1480',
    			'src', 'Flash',
    			'quality', 'high',
     			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
    			'align', 'center',
    			'play', 'true',
    			'loop', 'true',
    			'scale', 'showall',
    			'wmode', 'window',
    			'devicefont', 'false',
    			'id', 'Flash',
    			'bgcolor', '#141414',
    			'name', 'Flash',
    			'menu', 'true',
    			'allowFullScreen', 'false',
    			'allowScriptAccess','sameDomain',
    			'movie', 'Flash',
    			'salign', ''
    			); //end AC code
    	}
    </script>
    <noscript>
     	<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1552" height="1480" id="Flash" align="center">
    	<param name="allowScriptAccess" value="sameDomain" />
    	<param name="allowFullScreen" value="false" />
     	<param name="movie" value="Flash.swf" /><param name="quality"  value="high" /><param name="bgcolor" value="#141414" />	 <embed src="Flash.swf" quality="high" bgcolor="#141414" width="1552"  height="1480" name="Flash" align="center" allowScriptAccess="sameDomain"  allowFullScreen="false" type="application/x-shockwave-flash"  pluginspage="http://www.macromedia.com/go/getflashplayer" />
    	</object>
    </noscript>
    <!-- main body content ends here -->
    </div></div>
    </body>
    </html>

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