Jump to content

css positionong


natalieG

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>
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.