Place text on a page with css...?

Posted on 2009-04-29
Last Modified: 2012-05-06
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?
Question by:Kevin Smith
    LVL 14

    Expert Comment

    Put it in a div with a margin of 250px left and 250px top. That would do it!
    LVL 14

    Expert Comment

    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 }
    LVL 13

    Accepted Solution

    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

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <html xmlns="">
    <head runat="server">
          <style type="text/css" >
    #absolute { position:absolute; left: 250px; bottom:250px; background-color:#00FFCC; width:250px; height:250px
    <div id="absolute">I am here</div>

    Open in new window


    Author Closing Comment

    by:Kevin Smith
    perfect!  thanks everyone!

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at Browse or search based on font properties or name to find a suitable font for…
    The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now