The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> be center on browser
mary_d
post Mar 4 2009, 02:26 PM
Post #1





Group: Members
Posts: 3
Joined: 4-March 09
Member No.: 7,964



hi!
please help me! i have a flash (swf) object 1080x560px, and i would like to put it on a html page.
BUT, i would like to be center on top, bottom, right, left on any browser....
please, anyone who knows???? thank you........... rolleyes.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
mary_d
post Mar 4 2009, 02:45 PM
Post #2





Group: Members
Posts: 3
Joined: 4-March 09
Member No.: 7,964



like this:
http://d-graff.de/fricca/center.html
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
mary_d
post Mar 4 2009, 03:33 PM
Post #3





Group: Members
Posts: 3
Joined: 4-March 09
Member No.: 7,964



i find and i 've tried something. whats wrong now??

here is the code:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>CSS vertical center using float and clear</title>
<style type="text/css">

* {
margin:0;
padding:0;
}

html, body {
height:100%;
}

body {
background-color:#7F7F7F;
color:#FFFFFF;
font:100.01%/1.4 sans-serif;
text-align:center; /* horizontal centering for IE Win quirks */
}

#distance {
width:1px;
height:50%;
background-color:#fc6;
margin-bottom:-13.75em; /* half of container's height */
float:left;
}

#container {
margin:0 auto;
position:relative; /* puts container in front of distance */
text-align:left;
height:35em;
width:67.5em;
clear:left;
background-color:#7F7F7F;
border:1px solid #c50;
border-top-color:#fff;
border-left-color:#fff;
}

#container div {
font-size:80%;
float:right;
width:17em;
margin-left:2em;
}

#container div h2 {
font-size:120%;
font-weight:bold;
text-transform:uppercase;
margin:1em 0 0;
}

#container div h3 {
font-size:100%;
font-weight:bold;
margin:.5em 0 0 .75em;
}

#container ul {
margin-left:2em;
}

#container li span {
font-size:70%;
}


#container h1 {
font-size:120%;
padding-top:2.4em;
margin-left:2.4em;
}

#container p {
margin:1.5em 13.6em 1.5em 3em;
}

address {
font-weight:normal;
font-size:80%;
font-style:normal;
text-align:right;
margin:0 20em 0 3em;
}

body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
}
</style></head>
<body>

<div id="distance"></div>
<div id="container">
<h1> </h1>
</div>

</body>
</html>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Mar 4 2009, 04:53 PM
Post #4


WDG Member
********

Group: Root Admin
Posts: 7,998
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Your doctype declaration puts browsers in quirks mode. See Activating Browser Modes with Doctype.

MSIE does not support CSS-based centering in quirks mode.


--------------------
Darin McGrew
WDG Member since 1998
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 30th July 2014 - 08:08 AM