I am having trouble with the following thing. I have a code that is supposed to line up 6 images on the right margin. The six images are supposed to line up to make one image. It's not working right. can anyone help me and tell me what i am doing wrong? Here is my html:

<html>

<head>
<!-- 
   New Perspectives on HTML and XHTML 5th Edition
   Tutorial 3
   Case Problem 3

   Martin Luther King, Jr. Speech
   Author: xxxxxxxxxxxxxxxxxxx
   Date:   9/11/2009

   Filename:         king.htm
   Supporting files: banner.jpg, center.css, king1.gif - king6.gif
-->

   <title>Martin Luther King, Jr.</title>
    <style type="text/css">


       #imagem {float: right; margin-left: 2em; margin-right: 0em}
       #bannerimage {width 3.5em; float: none; margin: 0em}
    </style>
    <link href="center.css" rel="stylesheet" type="text/css" />
</head>

<body>

   <div id="banner">
      <img src="banner.jpg" id="bannerimage" alt="The Voices of Civil Rights Series." />
   </div>

<div id="pageContent">
   <h1>
      Martin Luther King, Jr.
   </h1>

   <p>
      <span style="float: left; font-weight: bold; font-size: 3em; color: rgb(102, 102, 240); line-height: 0.8em;
     border-right: solid 0.05em rgb(102, 102, 240); border-bottom: solid 0.05em rgb(102, 102, 240); padding-bottom: 0.2em; padding-right: 0.2em; margin-right: 0.2em" />I</span>
      have a dream that one day this nation will rise up and live out the 
      true meaning of its creed: "We hold these truths to be self-evident: 
      that all men are created equal." I have a dream that one day on the red 
      hills of Georgia the sons of former slaves and the sons of 
      former slaveowners will be able to sit down together at a table of 
      brotherhood. I have a dream that one day even the state of Mississippi, 
      a desert state, sweltering with the heat of injustice and oppression, 
      will be transformed into an oasis of freedom and justice. I have a dream 
      that my four children will one day live in a nation where they will not be 
      judged by the color of their skin but by the content of their character. 
      I have a dream today.

   </p>
<div id="imagem">
    <img src="king1.gif" alt=" " style="width: 6.7em" /><br>
    <img src="king2.gif" alt=" " style="width: 7.85em" /><br>
    <img src="king3.gif" alt=" " style="width: 11.45em" /><br>
    <img src="king4.gif" alt=" " style="width: 14.25em" /><br>
    <img src="king5.gif" alt=" " style="width: 15.5em" /><br>
    <img src="king6.gif" alt=" " style="width: 16.6em" /><br>
</div>


   <p>I have a dream that one day the state of Alabama, whose governor's lips are 
      presently dripping with the words of interposition and nullification, will 
      be transformed into a situation where little black boys and black girls will 
      be able to join hands with little white boys and white girls and walk together 
      as sisters and brothers. I have a dream today. I have a dream that one 
      day every valley shall be exalted, every hill and mountain shall be made low, 
      the rough places will be made plain, and the crooked places will be made 
      straight, and the glory of the Lord shall be revealed, and all flesh shall see it 
      together. This is our hope. This is the faith with which I return to the South. 
      With this faith we will be able to hew out of the mountain of despair a stone of 
      hope. With this faith we will be able to transform the jangling discords of 
      our nation into a beautiful symphony of brotherhood. With this faith we will be 
      able to work together, to pray together, to struggle together, to go to jail 
      together, to stand up for freedom together, knowing that we will be free 
      one day.
   </p>

   <p>This will be the day when all of God's children will be able to sing with a new 
      meaning, "My country, 'tis of thee, sweet land of liberty, of thee I sing. Land 
      where my fathers died, land of the pilgrim's pride, from every mountainside, 
      let freedom ring." And if America is to be a great nation, this must become true. 
      So let freedom ring from the prodigious hilltops of New Hampshire. Let freedom 
      ring from the mighty mountains of New York. Let freedom ring from the heightening                 Alleghenies of Pennsylvania! Let freedom ring from the snowcapped Rockies of 
      Colorado! Let freedom ring from the curvaceous peaks of California! But not only 
      that; let freedom ring from Stone Mountain of Georgia! Let freedom ring from 
      Lookout Mountain of Tennessee! Let freedom ring from every hill and every molehill 
      of Mississippi. From every mountainside, let freedom ring.
   </p>

   <p>When we let freedom ring, when we let it ring from every village and every hamlet, 
      from every state and every city, we will be able to speed up that day when all of 
      God's children, black men and white men, Jews and Gentiles, Protestants and 
      Catholics, will be able to join hands and sing in the words of the old Negro 
      spiritual, 
      <em>Free at last! Free at last! Thank God Almighty, we are free at last!</em>
   </p>

   <address>
      Created by the Midwest University Center for Diversity
   </address>
</div>

</body>
</html>
Member Avatar for ingeva

I am having trouble with the following thing. I have a code that is supposed to line up 6 images on the right margin.

This was rather lengthy, so I haven't studied it very closely.
A link to a web page might have helped.

But as a start, you have placed the images inside a div, which is good.
Then you have inserted a "br" ( I won't use the tag characters here) which is not so good. Instead, define "imagem" and image like this:

#image { float:right; }
#imagem img { display:block; }

and your problem should probably be solved.
If your images have the right size there's not need to specify the width, but if you define the width of the container, all images will get the same width by specifying it as a fixed percentage (ie. 100%).

Hey, did you ever manage to finish this assignment?
I have it right now and am completely stuck with no help.

I realize this is an old thread, but the material is exactly the same and I can't get Martin Luther to float to the right with the text wrapping him.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.