Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
absolute positioning problem/question
Old 06-27-2008, 01:53 PM absolute positioning problem/question
missingtime's Avatar
Skilled Talker

Posts: 83
Location: Athens, Greece
Trades: 0
Why are my absolute divs in the header area changing when I create a new page?

For each new page I'm saving the file under a new name and then simply changing the content....all except the header and footer. Problem is that when I do this two absolute divs shift out of position. It happens every time.

Why is this happening and how can I correct it?

Thank you
missingtime is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-27-2008, 02:32 PM Re: absolute positioning problem/question
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
We really need to see your code in order to figure this out. There could be any number of reasons for this behavior.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 06-27-2008, 03:02 PM Re: absolute positioning problem/question
missingtime's Avatar
Skilled Talker

Posts: 83
Location: Athens, Greece
Trades: 0
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- saved from url=(0014)about:internet -->
 
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<!-- TemplateBeginEditable name="doctitle" -->
 
<!-- TemplateEndEditable -->
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="stylesheet" type="text/css" href="../default.css" />
<style type="text/css">
</style>
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
</head>
<body>

<div id="upbg"></div>

<div id="outer">

  <div id="header">
    <div id="headercontent">		   
	  <h1> . . .</h1>
    </div>
  </div>

	<div id="headerpic"></div>
	
    <div id="menu">
      <!-- HINT: Set the class of any menu link below to "active" to make it appear active -->
<ul>
	  <li><a href="">xx</a></li>
<li><a href=">xx</a></li>
	  <li><a href="">xx</a></li>
	  <li><a href="">xx</a></li>
	  </ul>
  </div>
    
  <div id="menubottom"></div>

	<!-- TemplateBeginEditable name="Main Content " -->
	<div id="content"> </div>
	<!-- TemplateEndEditable -->
<div id="footer">
			<div class="left"><!-- #BeginLibraryItem "/Library/Footer.lbi" -->
<a href="../pdf_brochure/index.html">pdf brochure</a> | <a href="../site_map/index.html">site map</a> | <a href="../privacy_policy/index.html">privacy policy</a> | <a href="../terms_and_conditions/index.html">terms &amp; conditions</a> | <a href="../contact/index.html">contact</a><!-- #EndLibraryItem --></div>
	  </div>
</div>


<div id="toplogo"><img src="../images/image.gif" alt="" width="70" height="79" /></div>


<div id="subnavbar">

<ul>
    <li><a href="">xx</a></li>
<li><a href="">xx</a></li>
    <li><a href="">xx</a></li>
    <li><a href="">xx</a></li>
    <li><a href="">xx</a></li>
    <li><a href="">xx</a></li>
  </ul>

</div>

</body>
</html>

Here's the CSS:

*
{
padding: 0em;
margin: 0em;
}

body
{
	padding: 35px 0px 35px 0px;
	background-color: #000000;
	background-image: url(images/back.jpg);
}

body,input
{
font-size: 10pt;
font-family: "georgia", "times new roman", serif;
color: #333333;
}

p
{
line-height: 1.5em;
margin-bottom: 1.0em;
text-align: justify;
}

a
{
color: #B96D00;
text-decoration: underline;
}

a:hover
{
text-decoration: none;
}


h3 span
{
font-weight: normal;
}

h3,h4
{
display: inline;
font-weight: bold;
background-repeat: no-repeat;
background-position: right;
}

h3
{
	font-size: 1.7em;
	padding-right: 34px;
	background-image: none;
}

h4
{
	font-size: 1.2em;
	padding-right: 28px;
	background-image: none;
}

.contentarea
{
padding-top: 1.3em;
}

img
{
	border: medium solid #FFFFFF;
}

img.left
{
position: relative;
float: left;
margin: 0em 1.8em 1.4em 0em;
}

img.right
{
position: relative;
float: right;
margin: 0em 0em 1.8em 1.8em;
}

.divider1
{
position: relative;
background: #fff url('images/border2.gif') repeat-x;
height: 14px;
margin: 2.0em 0em 1.5em 0em;
clear: both;
}

.divider2
{
position: relative;
height: 1px;
border-bottom: solid 1px #eaeaea;
margin: 2.0em 0em 2.0em 0em;
}

.post .details
{
position: relative;
top: -1.5em;
font-size: 0.8em;
color: #787878;
}

.post ul.controls
{
clear: both;
}

.post ul.controls li
{
display: inline;
font-size: 0.8em;
}

.post ul.controls li a
{
background-repeat: no-repeat;
background-position: left;
padding: 0em 1.0em 0em 20px;
}

.post ul.controls li a.printerfriendly
{
background-image: url('images/icon-printerfriendly.gif');
}

.post ul.controls li a.comments
{
background-image: url('images/icon-comments.gif');
}

.post ul.controls li a.more
{
background-image: url('images/icon-more.gif');
}

.box
{
position: relative;
background: #FDFCF6 url('images/boxbg.gif') repeat-x;
left: -1.5em;
top: -1.5em;
padding: 1.5em;
border-bottom: solid 1px #E1D2BD;
margin-bottom: 1.0em;
}

ul.linklist
{
list-style: none;
}

ul.linklist li
{
line-height: 2.0em;
}

#toplogo {
	position:absolute;
	left:99px;
	top:48px;
	width:107px;
	height:111px;
	z-index:6;
	background-image: none;
}

#upbg
{
	position: absolute;
	top: 0px;
	left: 0px;
	width: 100%;
	height: 275px;
	z-index: 1;
	background-image: url(images/back.jpg);
	background-repeat: repeat-x;
}

#outer
{
z-index: 2;
position: relative;
/*
	The width value below controls the overall width of the design. By default it's set to 82%
	(so it'll take up 82% of the browser window's width). You can set it to a different percentage
	value (70%, 90%, etc.) or even a pixel value (760px, 800px, etc.) to enforce a fixed width.
*/
width: 82%;
border: solid 7px #fff;
background-color: #fff;
margin: 0 auto;
}

#header
{
	position: relative;
	width: 100%;
	height: 45px;
	margin-bottom: 2px;
	background-color: #0860A8;
	background-image: none;
	background-repeat: repeat-x;
}

#headercontent
{
	position: absolute;
	bottom: -3px;
	padding: 0em 2.0em 1.3em 2.0em;
	background-image: none;
	left: 371px;
	width: 632px;
}

#headercontent h1
{
	font-weight: normal;
	color: #fff;
	font-size: 1.5em;
}

#headercontent h1 sup
{
color: #777;
}

#headercontent h2
{
font-size: 1.0em;
font-weight: normal;
color: #aaa;
}

#search
{
position: absolute;
top: 5.5em;
right: 2.0em;
padding-right: 0.0em;
}

#search input.text
{
margin-right: 0.5em;
vertical-align: middle;
border-top: solid 1px #000000;
border-right: 0px;
border-bottom: solid 1px #777777;
border-left: 0px;
padding: 0.15em;
width: 10.0em;
}

#search input.submit
{
background: #939B00 url('images/buttonbg.gif') repeat-x;
border: solid 1px #5F6800;
font-weight: bold;
padding: 0.25em;
font-size: 0.8em;
color: #F2F3DE;
vertical-align: middle;
}

#headerpic
{
	position: relative;
	height: 120px;
	margin-bottom: 0px;
	background-color: #0860A8;
	background-image: url(images/topbanner.jpg);
	background-repeat: no-repeat;
	background-position: left top;
}

#menu
{
	position: relative;
	height: 3.0em;
	margin-bottom: 2px;
	background-color: #99CC00;
	background-image: url(images/menubg.gif);
	background-repeat: repeat-x;
	background-position: left top;
	padding-top: 0em;
	padding-right: 1em;
	padding-bottom: 0em;
	padding-left: 1em;
	border-top-width: 2px;
	border-right-width: 0px;
	border-bottom-width: 0px;
	border-left-width: 0px;
	border-top-style: solid;
	border-right-style: none;
	border-bottom-style: none;
	border-left-style: none;
	border-top-color: #FFFFFF;
	color: #FFFFFF;
}

#menu ul
{
	position: absolute;
	top: 9px;
	left: -5px;
}

#menu ul li
{
position: relative;
display: inline;
}

#menu ul li a
{
	padding: 0.5em 1.0em 0.9em 1.0em;
	color: #FFFFFF;
	text-decoration: none;
	font-weight: bold;
}

#menu ul li a:hover
{
text-decoration: underline;
}

#menu ul li a.active
{
background: #7F8400 url('images/menuactive.gif') repeat-x top left;
}

#menubottom
{
background: #fff url('images/border1.gif') repeat-x;
height: 14px;
margin-bottom: 1.5em;
}

#content
{
padding: 0em 2.0em 0em 2.0em;
}

#primarycontainer
{
float: left;
margin-right: -18.0em;
width: 100%;
}

#primarycontent
{
margin: 1.5em 22.0em 0em 0em;
}

#secondarycontent
{
margin-top: 1.5em;
float: right;
width: 18.0em;
}

#footer
{
	position: relative;
	height: 2.0em;
	clear: both;
	padding-top: 5.0em;
	background: #fff url('images/border2.gif') repeat-x 0em 2.5em;
	font-size: 1.0em;
}

#footer .left
{
	position: absolute;
	left: 198px;
	bottom: 12px;
	width: 433px;
}

#footer .right
{
position: absolute;
right: 2.0em;
bottom: 1.2em;
}
.underline {
	text-decoration: underline;
}
table {
	border: thin solid #99CC00;
}
.browntext {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 12px;
	color: #CC9933;
}
.green {
	background-color: #99CC00;
}
#subnavbar {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 11px;
	color: #FFFFFF;
	position: absolute;
	z-index: 7;
	left: 551px;
	top: 226px;
	width: 445px;
	background-image: none;
	background-repeat: repeat-x;
	background-position: left top;
	height: 1.5em;
	padding-right: 1px;
	padding-left: 1px;
	margin-bottom: 2px;
	font-weight: normal;
}
.breadcrumbs {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 12px;
	font-weight: normal;
	color: #996600;
}
#subnavbar ul {
	position: absolute;
	top: 3px;
	left: 14px;
}
#subnavbar ul li {
	position: relative;
	display: inline;
	word-spacing: 0px;
}
#subnavbar ul li a {
	color: #FFFFFF;
	text-decoration: none;
	font-weight: bold;
	font-size: 11px;
	padding-top: 0.5em;
	padding-right: 0.5em;
	padding-bottom: 0.9em;
	padding-left: 0.5em;
}
#subnavbar ul li a:hover {
	text-decoration: underline;
}
#subnavbar ul li a.active {
	background-image: none;
	background-repeat: repeat-x;
	background-position: left top;
}

Last edited by vangogh; 06-27-2008 at 05:59 PM..
missingtime is offline
Reply With Quote
View Public Profile
 
Old 06-27-2008, 03:35 PM Re: absolute positioning problem/question
missingtime's Avatar
Skilled Talker

Posts: 83
Location: Athens, Greece
Trades: 0
A quick question:

Why can I move a NON absolute div? I'm not sure I understand why I can drag it across the screen in the WYSIWYG editor. What happens when I move it?
missingtime is offline
Reply With Quote
View Public Profile
 
Old 06-27-2008, 05:12 PM Re: absolute positioning problem/question
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Dunno. It is possible to move elements is all sorts of ways, no matter how they are positioned. Don't know much about WYSIWYG.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 06-27-2008, 08:34 PM Re: absolute positioning problem/question
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
I have to say that your first problem is that you have EVERYTHING set to either position:relative or position:absolute. That is just ASKING for a migraine and is not the best way to do a layout.

I'd start by removing all of that positioning, 99% of the time it just isn't necessary. Use the normal document flow, probably need some floats, and then IF you need it, use positioning.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to absolute positioning problem/question
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24154 seconds with 12 queries