Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Cascading Style Sheets questions

  • 18-07-2005 5:16pm
    #1
    Registered Users, Registered Users 2 Posts: 3,691 ✭✭✭


    If anyone has some model answers for these questions, no links please...I've tried loads!! :rolleyes:

    How are Style rules created and applied?

    How are Class rules created and applied?


Comments

  • Moderators, Politics Moderators Posts: 41,235 Mod ✭✭✭✭Seth Brundle




  • Registered Users, Registered Users 2 Posts: 5,618 ✭✭✭Civilian_Target


    <div class="yerma">Text to format using yerma's template</div>

    (but you can also use the ID variable to apply styles)

    Then, in your stylesheet

    .yerma {font: 18px arial,sans-serif;
    color:#FF0000; font-weight:bold; text-align:justify;
    text-decoration:underline;}

    So - this example makes yerma be size 18 pixels, font arial, bright red, bold, justified and underline.

    Something like this


  • Registered Users, Registered Users 2 Posts: 21,263 ✭✭✭✭Eoin


    (but you can also use the ID variable to apply styles)

    Exactly - to use the ID attribute, the stylesheet entry would be:
    <div id="yerma">Text to format using yerma's template</div>
    
    #yerma {font: 18px arial,sans-serif;
    color:#FF0000; font-weight:bold; text-align:justify;
    text-decoration:underline;}
    

    Note that the hash identifies "yerma" as an element in the document, rather than a class in it's own right.

    To use the style attribute:
    <div style="font: 18px arial,sans-serif;color:#FF0000; font-weight:bold; text-align:justify;text-decoration:underline">Text to format using yerma's template</div>
    


Advertisement