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
https://forums.phpfreaks.com/topic/15425-css-positionong/
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
https://forums.phpfreaks.com/topic/15425-css-positionong/#findComment-62551
Share on other sites

Archived

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

×
×
  • 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.