Part of the EllisLab Network
pMachine Pro has been replaced by ExpressionEngine, our full featured web publishing solution. Please consider upgrading.
You can download pMachine Pro here: Download pMachine Pro  |  Download Language Packs
   
 
How do I format text within a <pre> tag?
Posted: 15 January 2007 01:20 PM   [ Ignore ]  
Summer Student
Avatar
Total Posts:  19
Joined  2005-11-10

I’m including code snippets in this post:

http://www.parallaxwebdesign.com/pmachine/blog_more.php?id=29_0_1_0_M

I can’t apply CSS formatting to pre (or it isn’t working for some reason) so I tried putting a div with a class within the pre. That changed the pre text from Courier or whatever it is to the font I’m using for my p tags, but still didn’t pick up any of the formatting from the div class.

From my post:

<pre><div class=“coded”>
  #
  # Alias: Maps web paths into filesystem paths and is used to
  # access content that does not live under the DocumentRoot.
  # Example:
  # Alias /webpath /full/filesystem/path
  #
  # If you include a trailing / on /webpath then the server will
  # require it to be present in the URL.  You will also likely
  # need to provide a <Directory> section to allow access to
  # the filesystem path.
<div></pre>

My CSS:

div.coded {
    font-size: 0.8em;
    font-family: “Courier New”, Courier, monospace;
    color: #8E8F0D;
    background-color: transparent;
  border: 1px solid #006;
}

What am I doing wrong?

Profile
 
 
Posted: 01 February 2007 04:01 AM   [ Ignore ]   [ # 1 ]  
Lab Assistant
RankRank
Total Posts:  110
Joined  2006-09-14

try

pre div.coded {
yourstyle: here;
}

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 233, on December 18, 2007 12:04 AM
Total Registered Members: 62653 Total Logged-in Users: 0
Total Topics: 77190 Total Anonymous Users: 0
Total Replies: 416693 Total Guests: 16
Total Posts: 493883    
Members ( View Memberlist )
Active Members: