You are here: Re: CSS and body margins « HTML « IT news, forums, messages
Re: CSS and body margins

Posted by Jonathan N. Little on 11/27/46 11:57

Christoph wrote:
>> <p class="bookends">
>> <img src="A.jpg" alt="A" class="lefthand">
>> <img src="B.jpg" alt="A" class="righthand">
>> Your text for this paragraph
>> ....
>> </p>
>> <p class="bookends">
>> <img src="C.jpg" alt="C" class="lefthand">
>> <img src="C.jpg" alt="Another C" class="righthand">
>> Your text for this other paragraph
>> ....
>> </p>
>
> Hmm, this is the only way it can be done?

No but it is not clear what you are trying to accomplish, that is why a
URL is aways useful. Even a failed attempt can be revealing.

Are this images content or just decoration? If the latter then it should
be background images! Then nested DIVs could work

<style type="text/css">
BODY { margin: 0; padding: 0; }
DIV.lefty {
margin: 0; padding: 0; /* image on left */
background: transparent url(A.jpg) repeat-y fixed top left;
}
DIV.righty {
/* left & right padding to 'clear' images here for 40px IMGs */
margin: 0; padding: 0 50px; /* image on right */
background: transparent url(B.jpg) repeat-y fixed top right;
}
</style>

HTML:

<div class="lefty">
<div class="righty">
Lorem ipsum dolor sit amet, consectetuer ...
</div>
</div>




</style>


> There is nothing I can do that
> will place the images (and, in the case of image C, repeat it to the bottom
> of the page) first thing w/o having to enclose everything in a <p> (or
> <div>, et. al.) tag?

Well you text should be in some sort of block element....



--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация