Computer problems,Computer help
*AX SOFT>>>Programming & Design

Changing text in a Div Box?


What would i have to do to change the text in a div box...

Lets say i wanted to make the text below green and much larger

<div class="Div1">HOW WOULD I CHANGE THIS TEXT???</div>

Since the div has a class assigned to it, you refer to the class with CSS:

<div class="Div1">HOW WOULD I CHANGE THIS TEXT???</div>
<style type="text/css">
.Div1 {
color:green;
font-size:200%;
}
</style>


Or you could put the CSS right into the div tag:

<div class="Div1" style="color:green; font-size:200%;">HOW WOULD I CHANGE THIS TEXT???</div>

<div class="Div1">HOW WOULD I CHANGE THIS TEXT???</div>

Set or add to your Div1 class like this:

Div1 {
color: #00ff00;
font-size: 28pt;
}

Change 28pt size if too large. If you want bold, add font-weight: bold;

If you do not have access to the Div1 class styling and it isn't doing much of anything anyway, then use:

<div style="color: #00ff00; font-size: 28pt;">This text is green and very large</div>

<div style="color: #00ff00; font-size: 28pt; font-weight: bold;">This text is green, bold and very large</div>

Ron

Tags
  General - Computers & Internet   Software   Security   Programming & Design   Facebook   Flickr   Google   MSN   MySpace
Related information
  • Need help with Java programming (involving arrays)?

    Just write one yourself. It's easy. // array1 is already defined double total = 0; for( int i=0; i < array1.length; i++){ total+=array[i]; } double avg = total/array1.length;

    ...
  • Trying to understand a piece of code in VBA [excel]?

    Sub Processor() ->Beginning of subroutine:Processor Dim ConstantCells As Range ->Define ConstantCells as a range of cells Dim FormulaCells As Range ->like above statement Dim cell As...

  • How do I keep a running total score in c++?

    Set the value to 0 above the loop and add to the value test = 0; loop{ score = 15; test+=score; } cout << test

    ...
  • Use ASP .NET's membership system or roll your own?

    Well the pro's are pretty obvious. It offers you a ready component for use to save/retrieve users for your website, it integrates pretty well very easily with Login server controls thus saving...

  • Is there an equivalent for the GetChar() function from VB.Net in VB6?

    Have you tried Mid(String,Index,Length)? MyString = "HELLO!" Print Mid(MyString,2,1) Would print "E"

    ...
  • ASCII/ANSI Character codes?

    You need to look at unicode, ASCII only covers the 256 characters, Unicode however uses 4 Bytes (32 bits) to store the character information (as opposed to two) and so can store mush more. As fo...

  • Sending POST Using <a href=...> instead of the submit button?

    What about using JavaScript to submit hidden forms when the link is clicked? :) For instance.. <form action="post.php" id="frm" method="post" style="displa...

  • In JSP I want to print out my database entries with the newest first?

    Order them in the DB query. Instead of SELECT * FROM ARTICLE Use something like SELECT * FROM ARTICLE ORDER BY Date DESC If you don't have a Date column use what ever column deno...

  •  

    Categories--Copyright/IP Policy--Contact Webmaster