I just would like to know what am I doing wrong? I used the exact same code for positioning other images. But for some reason, It is not working now. Basically, I feel like my CSS is not working. I also trying to design links but the CSS part is not working.
Hope it makes sense. Thanks and looking forward to hearing from you guys.
HTML Part:
<div id = 'last-part-of-the-side-news'>
<img id = 'apple' src = 'images/wework.jpg'>
</div>
CSS Part:
#last-part-of-the-side-news{
float:left;
}
#apple{
width: 230px;
height: 140px;
position:relative;
bottom: 448px;
left: 200px;
}
The image is positioned 448px above and 200px to the right of your div. Here is a snippet to illustrate the example:
#last-part-of-the-side-news{ float:left; width: 200px; height: 200px; background: blue; position: absolute; top: 448px; } #apple{ background: rgba(255,0,0,0.3); width: 230px; height: 140px; position:relative; bottom: 448px; left: 200px; }
<div id = 'last-part-of-the-side-news'> <div id = 'apple'></div> </div>
If your div is at the top of the document, your image would be outside of the window.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.