PDA

View Full Version : website margins are off


fabian9931
03-13-2008, 12:52 PM
so on my site looks awesome on my 19 wide inch monitor at home. centered perfect. but at work on a 17 lcd my site is pushed to the right of the screen making me use the scroller.... my margins are set at 0,0,0,0... any ideas on how to level things out for monitors? i know this has been asked before as i search the topic but i cant seem to understand the coding. so please talk in newbie language :grin:

davidj
03-13-2008, 03:03 PM
post a link to your site

fabian9931
03-13-2008, 03:13 PM
well the site isnt up and running. i was previewing it on other monitors by saving all the files on a usb and taking it with me to preview...

davidj
03-13-2008, 03:14 PM
post the code then

Rob_Che
03-13-2008, 06:51 PM
well the site isnt up and running. i was previewing it on other monitors by saving all the files on a usb and taking it with me to preview...

Cue childish voice... "ii doonntt beelliieevee yooouuu" ;)

I think someone's shy... :)

fabian9931
03-13-2008, 10:31 PM
just got home from work so i can post my code now... tell me if this is what you are looking for...


<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
margin-left: auto;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
background-color: #000000;
}
body,td,th {
color: #FFFFFF;
}
#apDiv1 {
position:absolute;
left:307px;
top:-124px;
width:676px;
height:558px;
z-index:1;
}
#apDiv2 {
position:absolute;
left:659px;
top:508px;
width:91px;
height:33px;
z-index:2;
}
.style2 {font-family: "Times New Roman", Times, serif; font-size: 22px;}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
}
#apDiv3 {
position:absolute;
left:12px;
top:189px;
width:271px;
height:478px;
z-index:3;
}
#apDiv12 {
position:absolute;
left:64px;
top:-61px;
width:590px;
height:204px;
z-index:4;
}
#apDiv4 {
position:absolute;
left:348px;
top:337px;
width:729px;
height:299px;
z-index:3;
}
#apDiv5 { position:absolute;
left:23px;
top:48px;
width:261px;
height:299px;
z-index:3;
}
.style5 {
font-size: 18px
}
-->
</style></head>
<body>
<div id="apDiv1"><img src="avamariestudios copy1.jpg" width="797" height="539" /></div>
<div class="style2" id="apDiv2"><a href="AMSpage2.html">Enter Site</a></div>
<div id="apDiv4">
<div id="apDiv6">
<div id="apDiv12">
<p class="style5">Welcome to AvaMarieStudios.</p>
<p class="style5">Photography is an art of memories, that touches the hearts and minds of many. An art that captures the most precious moments to last for a long long time. AvaMarieStudios will capture those memories which visually are missed within a split second. I seek to achieve creative vision to meet the needs of the clients. Thank you for visiting my website.</p>
<p class="style5">Photographer/Owner: Fabian Malovini</p>
</div>
</div>
</div>
</body>
</html>

edbr
03-14-2008, 04:31 AM
you are using absolute positioning so
#apDiv1 {
position:absolute;
left:307px;
top:-124px;
width:676px;
height:558px;
z-index:1;
}
#apDiv2 {
position:absolute;
left:659px;
top:508px;
width:91px;
height:33px;
z-index:2;
}it is not so much centered as is positioned
left:307px; and left:659px;
from the left of the screen

fabian9931
03-14-2008, 07:17 PM
you are using absolute positioning so
#apDiv1 {
position:absolute;
left:307px;
top:-124px;
width:676px;
height:558px;
z-index:1;
}
#apDiv2 {
position:absolute;
left:659px;
top:508px;
width:91px;
height:33px;
z-index:2;
}it is not so much centered as is positioned
left:307px; and left:659px;
from the left of the screen

so what do i need to adj? my left? to what? im sorry please explain to me, i am new to dreamweaver and not good with codes...thanks

domedia
03-16-2008, 09:08 PM
Absolute positioning is an absolute position relative to the top left corner of the viewport in your browsers. I can never be centered.

Are you looking for a centered design?
http://www.dreamweaverclub.com/css-center-content.php