ASP.NET Body Sylye Conversion Question (leftmargin)

Posted on 2006-06-02
Last Modified: 2009-10-06
Can someone tell me the best way to convert the body style to ASP.NET css supported style code?

<body style=leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0"

Is it better just put these in a css link or use margin-left, margin-top statements?  Can someone show we coding suggestions?   I am trying to convert some HTML to a aspx and getting css validation errors.  
Question by:Hojoformo
    LVL 96

    Expert Comment

    by:Bob Learned
    Here is an example of an inline CSS style block that you can use in the <HEAD> section to apply CSS styles to the body:

    <STYLE TYPE="text/css" MEDIA=screen>
      BODY  { background: url(foo.gif) red; color: black }
      P EM  { background: yellow; color: black }
      .note { margin-left: 5em; margin-right: 5em }

    LVL 5

    Accepted Solution

    Here is the css,

    <STYLE TYPE="text/css">


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
    IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    737 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

    18 Experts available now in Live!

    Get 1:1 Help Now