Jump to content

Archived

This topic is now archived and is closed to further replies.

natalieG

css positionong

Recommended Posts

we are trying to  have  have  the text in varsclass  top align with the  text in options class and have them
both relkaative to outerclass.  It looks like varsclass data is beoing displayed relative to  optiuons class
and not relative to outerclass.  Is there a way to align these two relative classes  to the outerclass?

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Adobe GoLive 6">
<title>Welcome to Adobe GoLive 6</title>
<style type="text/css" media="screen">
    <!--
    #outerclass{
    position:absolute;
    top:200px;
    left:200px;
    width:425px;
    height:120px;
    background-color:#aaaaaa}

  #optionclass{position:relative;
        top:10px;
        left:10px}

    #varsclass{
  position:relative;
    top:10px;
    left:150px;
        width:200px;
        height:50px;
        background-color:Yellow;
        font-family:Arial,Helvetica;
      font-size:16;
        font-weight:600;
        color:red}
  --></style>
</head>
<body bgcolor="#ffffff">
<div id="outerclass">
        <div id="optionclass">
          <div id="optionsDiv">Options</div>
              </div>
              <div id="varsclass">
          <div id="org">Organization</div>
          <div id="user">UserID</div>
          <div id="pwd">Password</div>
        </div>
          </div>
</body>

</html>

Share this post


Link to post
Share on other sites
If you remove all the position declarations, wouldn't that give you the normal state of things with everything aligned from the top of its container? Maybe margin/padding is what you need instead of position absolute/relative if you want to space things away from their container borders.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.