Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 262
  • Last Modified:

Place text on a page with css...?

I have a code that places the field from a database on the html page (Dreamweaver):

<%# /* Text ADOR */ AdorRec.FieldValue("First Name", Container) %>

I want to place it at a certain area in the page (250px down, 250px across).  How do I do this in CSS?
0
Kevin Smith
Asked:
Kevin Smith
  • 2
1 Solution
 
EMB01Commented:
Put it in a div with a margin of 250px left and 250px top. That would do it!
0
 
EMB01Commented:
You may also wish to place it in a box the size of 250px wide by 250px tall and place it in the center of the document. You may do this by, I believe:
body { text align: center }
div { width:250px; height: 250px; margin: 0px auto }
0
 
myderrickCommented:
I think absolute positioning should do:

#absolute { position:absolute; left: 250px; bottom:250px; background-color:#00FFCC; width:250px; height:250px
 
}


and assign it like this :

<div id="absolute"> Content goes here </div>

Try the code below:

Good luck

MD

 
<!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 runat="server">
  <title></title>
      <style type="text/css" >
     
#absolute { position:absolute; left: 250px; bottom:250px; background-color:#00FFCC; width:250px; height:250px
  
}
       </style> 
</head>
<body>
 
<div id="absolute">I am here</div>
 
</body>
</html>

Open in new window

0
 
Kevin SmithAuthor Commented:
perfect!  thanks everyone!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now