Hi, this might sound stupid, but how on earth can I put some simple html code as content ?

This the html code I have:



http-equiv="content-type">


cellpadding="0" cellspacing="0">
Only local images are allowed. alt="" src="hhtp://www.ajutorpc.ro/files/SG31G2B1.jpg">Only local images are allowed. style="width: 168px; height: 150px;" alt=""
src="http://www.ajutorpc.ro/files/SG31G2B1.jpg"> valign="undefined">Bla bla text here Only local images are allowed. style="width: 230px; height: 155px;" alt=""
src="http://www.ajutorpc.ro/files/SG31G2B2.jpg"> Only local images are allowed. style="width: 230px; height: 155px;" alt=""
src="http://www.ajutorpc.ro/files/SG31G2B3.jpg"> Only local images are allowed. style="width: 168px; height: 150px;" alt=""
src="http://www.ajutorpc.ro/files/SG31G2B1.jpg">




I have tried pasting this directly in the body field for a page content type, but all I get is an invisible table that shows the text

cellpadding="0" cellspacing="0">

alt="" src="hhtp://www.ajutorpc.ro/files/SG31G2B1.jpg">
style="width: 168px; height: 150px;" alt=""
src="http://www.ajutorpc.ro/files/SG31G2B1.jpg">
valign="undefined">Bla bla text here

style="width: 230px; height: 155px;" alt=""
src="http://www.ajutorpc.ro/files/SG31G2B2.jpg">
style="width: 230px; height: 155px;" alt=""
src="http://www.ajutorpc.ro/files/SG31G2B3.jpg">
style="width: 168px; height: 150px;" alt=""
src="http://www.ajutorpc.ro/files/SG31G2B1.jpg">

Can anyone direct me to a good tutorial where I can find out and learn what exact type of HTML code am I allowed to type in the body field ?

What I am actually trying to achieve is to have a picture on the left, on the right side of that picture some text, and then below these two three more pictures on the same row, from left to right. In plain HTML everything is very easy (even if not with CSS) but when I try to do this in Drupal I fail miserably. I have followed countless tutorials on views, CCK and Panels, and I have managed to follow and learn things from those, but I till cannot do this simple task of arranging a few pictures and text on one page.

Thank you very much for the help, and please understand that I have tried everything I could think of, including lots of Googling, before writing here.

P.S. Yes, I am selecting Full HTML for the Input Format.

Comments

Vially’s picture

The code got messed up

<body>
<table style="text-align: left; width: 600px;" border="0"
 cellpadding="0" cellspacing="0">
  <tbody>
    <tr>
      <td align="undefined" valign="undefined"><img
 alt="" src="hhtp://www.ajutorpc.ro/files/SG31G2B1.jpg"><img
 style="width: 168px; height: 150px;" alt=""
 src="http://www.ajutorpc.ro/files/SG31G2B1.jpg"></td>
      <td colspan="2" rowspan="1" align="undefined"
 valign="undefined">Bla bla text here</td>
    </tr>
    <tr>
      <td align="undefined" valign="undefined"><img
 style="width: 230px; height: 155px;" alt=""
 src="http://www.ajutorpc.ro/files/SG31G2B2.jpg"></td>
      <td align="undefined" valign="undefined"><img
 style="width: 230px; height: 155px;" alt=""
 src="http://www.ajutorpc.ro/files/SG31G2B3.jpg"></td>
      <td align="undefined" valign="undefined"><img
 style="width: 168px; height: 150px;" alt=""
 src="http://www.ajutorpc.ro/files/SG31G2B1.jpg"></td>
    </tr>
  </tbody>
</table>
</body>
PhilUK’s picture

Plus, have you changed the Input type to Full HTML?

iantresman’s picture

Perhaps the <body> tags are messing it up; the page will already have such tags, and only one set are allowed per page.

It's also possible that the Style tags may be overridden by your cascading style sheets.

You might also want to check the Site configuration | Input formats, and check the "Full HTML input format" Configuration to see if they modify your HTML.

bAcKuP-dupe’s picture

Also, in the "input type" I usually choose: "PHP code" when publishing HTML content, this does the job.

joachim’s picture

I suspect it's the filter adding BR tags for every line break.
As some of yours appear to come inside tags, it's going to totally mess things up.

Vially’s picture

Thanks for the input, I have removed the body tag and switched to PHP instead of Full HTML, and it's working somewhat. I suppose that the cell spacing and table color is given by my CSS style file, so I'll look there.

I only need to ask one thing, since I already bothered you guys. What would be the best way to customize a certain node's appearance ? For example, I needed to have a different background page for a certain page, and someone suggested to change this in the CSS styles file. However, when i changed that, all of my pages took the same color for the background, and this is definitely not I wanted.

This is how my CSS file sets the background for the content:

.node .content {
  padding-top:0px;
  padding-right:0px;
  background: url(/sites/all/themes/fourseasons/img/bg_grey.gif);
}

Is it possible to define different background colors for different node types (Page, Story...etc), or is it some other way to do this ? (like cck or views.. etc). I am asking this because I am thinking that maybe I will be able to define a new content type like Page 2 or smth, and then give it a different background color... etc

The theme I am using is fourseasons, in case it matters.

Thanks again for the input.

iantresman’s picture

If there was a way to assign a unique ID to the body tag of individual pages, then you could define a unique CSS block for that page.

Vially’s picture

So I suppose that this is actually not possible ? How about having different themes for different pages, could this be a solution ?

WorldFallz’s picture

another thing you could do is create different content types for the pages you wish to style differently then style them with page-contenttype.tpl.php or node-contenttype-tpl.php depending on which parts of the page you wish to to style. This presumes you are using the phptemplate engine.