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.
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%;
}
</style>
"It will never rain roses: when we want to have more roses, we must plant more roses."
- George Eliot
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.
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
You can place center in the body tag, or you can just put it before the body tag and just put <center>
Originally Posted by
Britterzz
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.
Originally Posted by
meesam512
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>
Originally Posted by
spufi
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%;
}
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 03:18 PM .
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%; }
</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>
"It will never rain roses: when we want to have more roses, we must plant more roses."
- George Eliot
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
Forum Rules
Bookmarks