[thelist] Putting two divs together

Twitchell, Lucy c-ltwitche at state.pa.us
Fri Jul 25 13:44:32 CDT 2003


Carlos Costa Portela wrote on Thursday, July 24, 2003 4:03 PM:
>     <div class="container">
>       <div class="header">
> 	<div class="logo">
> 	  <img src="imag/logo.gif">
> 	</div>
> 	<div class="linea_disc">
> 	  <img src="imag/linea_disc.gif">
> 	</div>
>       </div>
>     </div>
> 
> 	When I see this code with the browser, the first image is on top
> of the second image. And I want the two images together.

Hi, Carlos -

I don't know whether you've gotten a response yet, but div elements are
block elements, rather than inline, which means that each div fills an
entire line. Span elements, however, can be displayed together on one line.
Therefore, this coding might work better for you:

<div class="container">
  <div class="header">
    <span class="logo">
      <img src="imag/logo.gif">
    </span>
    <span class="linea_disc">
      <img src="imag/linea_disc.gif">
    </span>
  </div>
</div>

Also, here are some links to basic CSS information:

Adding a touch of style: 
  http://www.w3.org/MarkUp/Guide/Style.html
CSS Examples: 
  http://www.w3schools.com/css/css_examples.asp
CSS Frequently Asked Questions: 
  http://www.hwg.org/resources/faqs/1cssFAQ.html
Everything you ever wanted to know about Style:
  http://www.westciv.com/style_master/academy/css_tutorial/index.html
The CSShark Answers FAQs:
  http://www.mako4css.com/index.htm
Eric Meyer: CSS:
  http://www.meyerweb.com/eric/css/

Happy computing,

Lucy


More information about the thelist mailing list