Previous Message
Next Message

Centering a div with an image

Sent by Jan_Erik_Moström on 21 December 2007 09:09


Jan Erik Moström [EMAIL-REMOVED]> 07-12-20 23.09

>What I've done is this:
>
><div id="singlephoto">
><div id="photobackground">
><img 
>src="foto5/2007/2007-05-10_fritids/2007-05-10_09-46-46_549.jpg" 
>alt="" width="800" height="535" />
><h1>Någon rubrik</h1>
><p>
>Här kommer nu själva beskrivningen
></p>
></div>
></div>

Of course there is one solution that seems to work fine:

     <table>
         <tr><td>
         <div id="jem-photobackground">
             <img 
src="foto5/2007/2007-05-10_fritids/2007-05-10_09-46-46_549.jpg" 
alt="" width="800" height="535" />
             <h1>Någon rubrik</h1>
             <p>
                 Här kommer nu själva beskrivningen
             </p>
         </div>
         </td></tr>
     </table>

and

         table
         {
             margin: auto;
         }

But I'm not sure if this is a good solution.
-- 
Jan Erik Moström, www.mostrom.pp.se

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: