| View previous topic :: View next topic |
| Author |
Message |
pptdgc
Joined: 13 Oct 2005 Posts: 23
|
Posted: Sun Oct 16, 2005 8:28 am |
|
|
|
So are you saying I should not use absolute positioning?
I have tried the code you have given me and now everything has gone to the left, the button links are now on top of each other and nothing is aligned correctly.
How do I float the flash to the right?
Also the original thing I was trying to do was make the page I have created centered in the browser window, which I still cant do??
Thanks |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8259 Location: Castle Rock CO USA
|
Posted: Sun Oct 16, 2005 8:45 am |
|
|
|
I am getting it to center but the other CSS code you are using is fighting it.
Take a simple look at
| Code: |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<style type="text/css">
body {
margin:50px 0px; padding:0px;
text-align:center;
font-size: 9pt;
font-family: "Arial";
color: black;
line-height: 12pt;
}
#main {
width:730px;
margin:0px auto;
text-align:left;
padding:15px;
border:1px dashed #333;
background-color:#eee;
}
</style>
</head>
<body>
<div id="main">
</div>
</body>
</html> |
Does this not work for you? |
|
Superpetauction

Joined: 07 Oct 2005 Posts: 47 Location: Logansport, Indiana
|
Posted: Sun Oct 16, 2005 8:51 am |
|
|
|
check this out. is this how you want it
| Code: |
<body><style>
body {
font-size: 9pt;
font-family: "Arial";
color: black;
line-height: 12pt;
}
/* Indent paragraphs */
P {margin-left: 24pt;
margin-right: 24pt;}
H1 {font: 11pt "Comic Sans MS" "Arial";
font-weight: bold;
color:blue;
line-height: 0pt;}
H2 {font: 10pt "Comic Sans MS" "Arial";
font-weight: bold;
line-height: 0pt;}
H3 {font: 11pt "Comic Sans MS" "Arial";
font-weight: bold;
color:blue;
}
div {
display:block;
position:absolute;
}
div.title{
left:15px;
top:15px;
left:130px;
height:160px;
border-width:1px;
border-color:#458CC4;
border-style:solid;
}
div.menu_home{
z-index:1;
text-align:center;
vertical-align:middle;
background-color:#0099ff;
left:235px;
top:185px;
width:98px;
height:25px;
border-width:1px;
border-color:#458CC4;
border-style:solid;
}
div.menu_help{
z-index:1;
text-align:center;
vertical-align:middle;
background-color:#0099ff;
left:430px;
top:185px;
width:98px;
height:25px;
border-width:2px;
border-color:#458CC4;
border-style:solid;
}
div.menu_questions{
z-index:1;
text-align:center;
vertical-align:middle;
background-color:#0099ff;
left:655px;
top:185px;
width:98px;
height:25px;
border-width:2px;
border-color:#458CC4;
border-style:solid;
}
div.one {
left:100px;
top:220px;
width:350px;
height:2500px;
padding-left:20px;
padding-right:20px;
border-width:2px;
border-color:#458CC4;
border-style:solid;
}
div.flash {
left:500px;
top:220px;
width:300px;
height:2500px;
border-width:2px;
border-color:#458CC4;
border-style:solid;
}
div.footnote {
font-size: 9pt;
line-height: 12pt;
text-align: center;
left:120px;
top:2750px;
width:720px;
height:200px;
}
</style>
<html><head><title>TEST</title>
<link rel="STYLESHEET" type="text/css" href="style.css" /></head>
<body bgcolor=white>
<div class="title">
<img src="images/title.jpg" alt="TEST" width="700px" height="160px" />
</div>
<div class="menu_home"><a href="index.html">Home</a></div>
<div class="menu_help"><a href="help.html">help</a></div>
<div class="menu_questions"><a href="questions and answers.html">Q&A</a></div>
<div class="flash">
<object width="350px" height="700px">
<param name="movie" value="1.swf">
<embed src="1.swf" width="350px" height="700px">
<object width="350px" height="560px">
</embed><param name="movie" value="2">
<embed src="2" width="350px" height="560px">
<object width="350px" height="560px">
</embed><param name="movie" value="3.swf">
<embed src="3.swf" width="350px" height="185px">
</embed>
<object width="350px" height="310px">
</embed><param name="movie" value="4.swf">
<embed src="4.swf" width="350px" height="310px">
</embed>
<object width="350px" height="310px">
</embed><param name="movie" value="5.swf">
<embed src="5.swf" width="350px" height="310px">
</embed>
</object>
</div>
<div class="one">
<br /><h1>TITLE</h1>
text<br />
<h1>TITLE2</h1>
text2<br />
<h1>TITLE3</h1>
text3<br /><br />
</div>
<div class="footnote"><hr />
<i>footnote</i><hr />
</div>
</body></html> |
|
|
pptdgc
Joined: 13 Oct 2005 Posts: 23
|
Posted: Sun Oct 16, 2005 10:26 am |
|
|
|
| Corey Bryant wrote: |
</html>[/code] Does this not work for you? |
No I have tried copying this text and saving it as a style sheet but when I load my html file the page is not centered, and everything has become unaligned. |
|
pptdgc
Joined: 13 Oct 2005 Posts: 23
|
Posted: Sun Oct 16, 2005 10:32 am |
|
|
|
| Superpetauction wrote: |
check this out. is this how you want it [code]
|
I have tried this and it does move everything over to the right slightly, allthough it is not centered. Surely this method would only be successfull if everyone has the same xcreen resolution.
I guess I thought there would be a way to mkae the page I have created perfectly centered on a browser with any screen resoultion. |
|
Superpetauction

Joined: 07 Oct 2005 Posts: 47 Location: Logansport, Indiana
|
Posted: Sun Oct 16, 2005 11:04 am |
|
|
|
how about this?
am i getting close?
| Code: |
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<style type="text/css">
body {
margin:50px 0px; padding:0px;
text-align:center;
font-size: 9pt;
font-family: "Arial";
color: black;
line-height: 12pt;
}
#main {
width:730px;
margin:0px auto;
text-align:left;
padding:15px;
border:1px dashed #333;
background-color:#eee;
}
/* Indent paragraphs */
P {margin-left: 24pt;
margin-right: 24pt;}
H1 {font: 11pt "Comic Sans MS" "Arial";
font-weight: bold;
color:blue;
line-height: 0pt;}
H2 {font: 10pt "Comic Sans MS" "Arial";
font-weight: bold;
line-height: 0pt;}
H3 {font: 11pt "Comic Sans MS" "Arial";
font-weight: bold;
color:blue;
}
div {
display:block;
}
div.title{
left:15px;
top:15px;
left:130px;
height:160px;
border-width:1px;
border-color:#458CC4;
border-style:solid;
}
div.menu_home{
z-index:1;
text-align:center;
vertical-align:middle;
background-color:#0099ff;
left:235px;
top:185px;
width:98px;
height:25px;
border-width:1px;
border-color:#458CC4;
border-style:solid;
}
div.menu_help{
z-index:1;
text-align:center;
vertical-align:middle;
background-color:#0099ff;
left:430px;
top:185px;
width:98px;
height:25px;
border-width:2px;
border-color:#458CC4;
border-style:solid;
}
div.menu_questions{
z-index:1;
text-align:center;
vertical-align:middle;
background-color:#0099ff;
left:655px;
top:185px;
width:98px;
height:25px;
border-width:2px;
border-color:#458CC4;
border-style:solid;
}
div.one {
left:100px;
top:220px;
width:350px;
height:2500px;
padding-left:20px;
padding-right:20px;
border-width:2px;
border-color:#458CC4;
border-style:solid;
}
div.flash {
left:500px;
top:305px;
width:300px;
height:2500px;
border-width:2px;
border-color:#458CC4;
border-style:solid; position:absolute;
}
div.footnote {
font-size: 9pt;
line-height: 12pt;
text-align: center;
left:120px;
top:2750px;
width:720px;
height:200px;
}
</style>
</head>
<body>
<div id="main">
<div class="title">
<img src="images/title.jpg" alt="TEST" width="700px" height="160px" />
</div>
<div class="menu_home"><a href="index.html">Home</a></div>
<div class="menu_help"><a href="help.html">help</a></div>
<div class="menu_questions"><a href="questions and answers.html">Q&A</a></div>
<div class="flash">
<object width="350px" height="700px">
<param name="movie" value="1.swf">
<embed src="1.swf" width="350px" height="700px">
<object width="350px" height="560px">
</embed><param name="movie" value="2">
<embed src="2" width="350px" height="560px">
<object width="350px" height="560px">
</embed><param name="movie" value="3.swf">
<embed src="3.swf" width="350px" height="185px">
</embed>
<object width="350px" height="310px">
</embed><param name="movie" value="4.swf">
<embed src="4.swf" width="350px" height="310px">
</embed>
<object width="350px" height="310px">
</embed><param name="movie" value="5.swf">
<embed src="5.swf" width="350px" height="310px">
</embed>
</object>
</div>
<div class="one">
<br /><h1>TITLE</h1>
text<br />
<h1>TITLE2</h1>
text2<br />
<h1>TITLE3</h1>
text3<br /><br />
</div>
<div class="footnote"><hr />
<i>footnote</i><hr />
</div>
</body>
</html> |
|
|
Superpetauction

Joined: 07 Oct 2005 Posts: 47 Location: Logansport, Indiana
|
Posted: Sun Oct 16, 2005 11:53 am how about this one |
|
|
|
how about this one
| Code: |
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<style type="text/css">
body {
margin:50px 0px; padding:0px;
text-align:center;
font-size: 9pt;
font-family: "Arial";
color: black;
line-height: 12pt;
}
#main {
width:730px;
margin:0px auto;
text-align:left;
padding:15px;
border:1px dashed #333;
background-color:#eee;
}
/* Indent paragraphs */
P {margin-left: 24pt;
margin-right: 24pt;}
H1 {font: 11pt "Comic Sans MS" "Arial";
font-weight: bold;
color:blue;
line-height: 0pt;}
H2 {font: 10pt "Comic Sans MS" "Arial";
font-weight: bold;
line-height: 0pt;}
H3 {font: 11pt "Comic Sans MS" "Arial";
font-weight: bold;
color:blue;
}
div {
display:block;
}
div.title{
left:15px;
top:15px;
left:130px;
height:160px;
border-width:1px;
border-color:#458CC4;
border-style:solid;
}
div.menu_home{
z-index:1;
text-align:center;
vertical-align:middle;
background-color:#0099ff;
left:235px;
top:185px;
width:98px;
height:25px;
border-width:1px;
border-color:#458CC4;
border-style:solid;
}
div.menu_help{
z-index:1;
text-align:center;
vertical-align:middle;
background-color:#0099ff;
left:430px;
top:185px;
width:98px;
height:25px;
border-width:2px;
border-color:#458CC4;
border-style:solid;
}
div.menu_questions{
z-index:1;
text-align:center;
vertical-align:middle;
background-color:#0099ff;
left:655px;
top:185px;
width:98px;
height:25px;
border-width:2px;
border-color:#458CC4;
border-style:solid;
}
div.one {
left:100px;
top:220px;
width:350px;
height:2500px;
padding-left:20px;
padding-right:20px;
border-width:2px;
border-color:#458CC4;
border-style:solid;
}
div.flash {
left:500px;
top:305px;
width:20px;
height:2500px;
border-width:2px;
border-color:#458CC4;
border-style:solid; position:absolute;
}
div.footnote {
font-size: 9pt;
line-height: 12pt;
text-align: center;
left:120px;
top:2750px;
width:720px;
height:50px;
}
</style>
</head>
<body>
<div id="main">
<div class="title">
<img src="images/title.jpg" alt="TEST" width="720px" height="160px" />
</div>
<div class="menu_home"><a href="index.html">Home</a></div>
<div class="menu_help"><a href="help.html">help</a></div>
<div class="menu_questions"><a href="questions and answers.html">Q&A</a></div>
<div class="flash">
<object width="350px" height="700px">
<param name="movie" value="1.swf">
<embed src="1.swf" width="350px" height="700px">
<object width="350px" height="560px">
</embed><param name="movie" value="2">
<embed src="2" width="350px" height="560px">
<object width="350px" height="560px">
</embed><param name="movie" value="3.swf">
<embed src="3.swf" width="350px" height="185px">
</embed>
<object width="350px" height="310px">
</embed><param name="movie" value="4.swf">
<embed src="4.swf" width="350px" height="310px">
</embed>
<object width="350px" height="310px">
</embed><param name="movie" value="5.swf">
<embed src="5.swf" width="350px" height="310px">
</embed>
</object>
</div>
<div class="one">
<br /><h1>TITLE</h1>
text<br />
<h1>TITLE2</h1>
text2<br />
<h1>TITLE3</h1>
text3<br /><br />
</div>
<div class="footnote"><hr />
<i>footnote</i><hr />
</div>
</body>
</html> |
|
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8259 Location: Castle Rock CO USA
|
Posted: Sun Oct 16, 2005 11:54 am |
|
|
|
| pptdgc wrote: |
| Corey Bryant wrote: |
</html>[/code] Does this not work for you? |
No I have tried copying this text and saving it as a style sheet but when I load my html file the page is not centered, and everything has become unaligned. |
First - don't save it as a style sheet. You are trying to use XHTML I see. Copy the entire code that I gave you & save it as test.html. Now view it in IE so that you can first see the centered layer and then we can work from there |
|
pptdgc
Joined: 13 Oct 2005 Posts: 23
|
Posted: Sun Oct 16, 2005 11:58 am |
|
|
|
| Have you tried it in a browser. If its working for you I can't understand why its not for me? Strange |
|
Superpetauction

Joined: 07 Oct 2005 Posts: 47 Location: Logansport, Indiana
|
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8259 Location: Castle Rock CO USA
|
Posted: Sun Oct 16, 2005 12:06 pm |
|
|
|
| pptdgc wrote: |
| Have you tried it in a browser. If its working for you I can't understand why its not for me? Strange |
I did not need to because I know it will work. But I uploaded it and tested it in a IE and Firefox: http://www.coreybryant.net/html/ and it is centered.
You are trying to do too much. Let's start off basic and then add your layers in. |
|
pptdgc
Joined: 13 Oct 2005 Posts: 23
|
Posted: Sun Oct 16, 2005 12:07 pm |
|
|
|
| Corey Bryant wrote: |
| pptdgc wrote: |
| Corey Bryant wrote: |
</html>[/code] Does this not work for you? |
No I have tried copying this text and saving it as a style sheet but when I load my html file the page is not centered, and everything has become unaligned. |
First - don't save it as a style sheet. You are trying to use XHTML I see. Copy the entire code that I gave you & save it as test.html. Now view it in IE so that you can first see the centered layer and then we can work from there |
Sorry I was being a bit stupid there... Yes it is centered in my browser. How easy will it be to incorporate my css and xhtml with this?
Thanks for your help by the way |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8259 Location: Castle Rock CO USA
|
Posted: Sun Oct 16, 2005 12:10 pm |
|
|
|
| pptdgc wrote: |
Sorry I was being a bit stupid there... Yes it is centered in my browser. How easy will it be to incorporate my css and xhtml with this?
Thanks for your help by the way |
Great - that is the first step. With your XHTML, it is very simple. I am assuming though that you want the flash div on the left & the one div on the right? If so float the flash to the left and the one to the right. The "menu buttons" - any special thing with them? |
|
pptdgc
Joined: 13 Oct 2005 Posts: 23
|
Posted: Sun Oct 16, 2005 12:20 pm |
|
|
|
Actually its the other way round I want the div.flash on the right and the div.one on the left.
The first thing I want at the top is an image for my title. Then the buttons underneath that horizontally. For now I have 3 but eventually 6.
Then underneath that I would like the div.one on the left and the div.flash on the right each taking up half the width with room for a border.
Can I still use my existing css? I haven't used float before. Am I right in saying that i'm no longer using absolute positioning and getting rid of the 'top' and 'left' alignments?
Thanks |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8259 Location: Castle Rock CO USA
|
Posted: Sun Oct 16, 2005 12:28 pm |
|
|
|
Correct - I hardlyy ever use absolute unless I have to. Take a look at
| Code: |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<style type="text/css">
body
{
margin:50px 0px;
padding:0px;
text-align:center;
font-size: 9pt;
font-family: Arial, Verdana, Helvetica, sans-serif;
color: black;
line-height: 12pt;
}
#main {
width:730px;
margin:0px auto;
text-align:left;
padding:15px;
border:1px dashed #333;
background-color:#eee;
}
p {margin-left: 24pt;
margin-right: 24pt;}
h1 {font: 11pt "Comic Sans MS" "Arial";
font-weight: bold;
color:blue;
line-height: 0pt;}
h2
{
font: 10pt "Comic Sans MS" "Arial";
font-weight: bold;
line-height: 0pt;
}
div.title
{
width:700px;
height:160px;
}
div.one {
width:350px;
height:1800px;
padding-left:20px;
padding-right:20px;
float: left;
}
div.footnote {
font-size: 9pt;
line-height: 12pt;
text-align: center;
width:700px;
height:200px;
clear: both
}
div.flash {
width:350px;
height:1800px;
float: right
}
</style>
</head>
<body>
<div id="main">
<div class="title">
<img src="images/title.jpg" alt="TEST" width="700px" height="160px" />
</div>
<div class="menu_home"><a href="index.html">Home</a></div>
<div class="menu_help"><a href="help.html">help</a></div>
<div class="menu_questions"><a href="questions and answers.html">Q&A</a></div>
<div class="one">
<br /><h1>TITLE</h1>
text<br />
<h1>TITLE2</h1>
text2<br />
<h1>TITLE3</h1>
text3<br /><br />
</div>
<div class="flash">
<object width="350px" height="700px">
<param name="movie" value="1.swf">
<embed src="1.swf" width="350px" height="700px">
<object width="350px" height="560px">
</embed><param name="movie" value="2">
<embed src="2" width="350px" height="560px">
<object width="350px" height="560px">
</embed><param name="movie" value="3.swf">
<embed src="3.swf" width="350px" height="185px">
</embed>
<object width="350px" height="310px">
</embed><param name="movie" value="4.swf">
<embed src="4.swf" width="350px" height="310px">
</embed>
<object width="350px" height="310px">
</embed><param name="movie" value="5.swf">
<embed src="5.swf" width="350px" height="310px">
</embed>
</object>
</div>
<div class="footnote"><hr />
<i>footnote</i><hr />
</div>
</div>
</body>
</html> |
Not too sure what the code is though that you are trying to use to embed your flash is though. You have a few objects opened and only one of them closed. The code is more like:
| Code: |
<object width="550" height="400">
<param name="movie" value="somefilename.swf">
<embed src="somefilename.swf" width="550" height="400">
</embed>
</object> |
or from Macromedia's site:
| Code: |
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
WIDTH="550" HEIGHT="400" id="myMovieName">
<PARAM NAME=movie VALUE="myFlashMovie.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED src="/support/flash/ts/documents/myFlashMovie.swf" quality=high bgcolor=#FFFFFF WIDTH="550" HEIGHT="400"
NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT> |
|
|
|