January 17th, 2013, 02:29 PM
CSS independent block
Hello to all, I'm a new member.
I have one question.
I created website using HTML,PHP,CSS.
I use the principle described on the page 960 gs
Now I would like to add one block with small picture. This block must be independent of other elements.
For example, let say that I would like to add block 100x100 to position (500,500).
How to write CSS code ?
Other elements must remain the same as they are now.
January 18th, 2013, 01:29 AM
Do you want to have the image float 500x 500y on the screen, or relative to the element it's in?
If you just want a block with your image in it, you can create a css class for instance
Then in your source code, in your body tag, add a
<div class="image_div"><img src="yourimage.jpg" /></div>
That is one way to do it, it really depends on how you want it positioned. But that should do it.
January 18th, 2013, 03:58 AM
Thanks for answer. That works.
I also tried this:
That does not work beacuse there is no data between div tags.
Do you maybe know how to handle this :-) ?
January 18th, 2013, 10:07 AM
Sure, inside your div just add this
Originally Posted by bijeli
<div class="image_div"> </div>
January 18th, 2013, 10:26 AM
Add this below your .image_div class in your css file: