Community discussion forum

ASP.Net and CSS

  • 1 year ago

    Hi,

    I have this markup in an Asp.Net 2.0 page:

    <p align="right"><font size="4" color="white"><i>Finding your item: </i></font>
    <font size = "2" color="blue" ><strong>All</strong> your items in one location.</font></p>

    As you can see, there are two font sizes and colours within one paragraph and all the text is on one line.

    How do I do this with a CSS class?

    I am wanting to make this comply with XHTML 1.0 Strict.

    Also, is the use of <strong> permitted?

    Thanks,
    Darren
     

  • 1 year ago

    I think you should read MS's sections on CSS.

    You will have to use the class or id property in the tag;

    <p class="content">

    Then in your css style sheet create a class:

    .content{text-align:right}

    Then you will need to reference this sheet from your page in the <head> section:

    <link rel="stylesheet" href="App_Themes/Standard/Default.css" />

     

Post a reply

Enter your message below

Sign in or Join us (it's free).

We'd love to hear what you think! Submit ideas or give us feedback