So basically what I want to do is this:
Lets take this svg as an example:
https://www.freepik.com/free-vector/blank-screen-laptop-gadget-icon-white-background_9306518.htm
What I want to do in my next.js project is following:
Put my own code inside the "monitor" area of this notebook.
Also make this responsible
So I need a good way to display the notebook and then I create my own div thats the same height and width as the notebook screen and I can put anything else I want into it (paragraphs, h1 etc). So it seems that my code / page appears directly onto the notebook screen.
What is the best way to achieve this?
I heard about clip-path but I wasn't able to wrap my head around this.
Or no SVG at all
Make the laptop PNG screen transparent, and position it over your content
<style>
#LAPTOP{
position:relative;
overflow:hidden;
width:300px;
height:200px;
}
#SCREEN,#BORDER{
position:absolute;
}
#SCREEN{
margin:1em;
margin-left:3em;
}
#MAP{
zoom:.5;
}
#BORDER{
width:100%;
height:100%;
z-index:999;
}
</style>
<div id="LAPTOP">
<div id="SCREEN">
<b>Hello World!</b>
<img id="MAP" src="//lh3.googleusercontent.com/proxy/7OrKxhEgjUlMNO280hA_iums8CxNpExIwZARBhDjhboAEgof-YYF7s4I9di1HREv3QKyzadoXZ74PlelwJ7ejpLBl5lXRto">
</div>
<img id="BORDER" src="https://i.ibb.co/yd47GPy/laptop-screen.png">
</div>
So I have this picture:
http://www.kyea.org/imageuploads/MC900382613.JPG
It's of a hand with a pencil and I'd like to position it on my web page so that it looks like it's writing the content. Is there a way to do this? I've tried messing around with background-origin, background-size, background-position, and nothing seems to work.
The following css est the image position .....
img {
position:relative;
float:right;
top:-15px;
left:-198px;
}
#text {
position:relative;
color:green;
text-align:left;
top:50px;
right:-90px;
}
for demo:JSFIDDLE DEMO
http://jsfiddle.net/AmKHx/
Hello all,
I linked my code on the top. My main problem is that I have my header, content and footer perfectly set that works with all websites. It does not have a scrolling feature or anything. Everytime I try to add the Intel Logo to the screen. It does what it is up there. I move it around and tweek it and then it works for one browser and not the other... It keeps changing. I want the logo to stick to the left perfectly along with the header I made with CSS. Also I want the Mobility Group Text at that height right next to the logo, but for some reason it always messes up my header content and footer as well when I paly with it. So pretty much I want The Logo on first then Mobility Group Right next to itand make it very smooth!
Also I have just learned html css and php and if you guys see something in my code that could be done smarter please let me know. I need critical feedback so that I can progress in learning these new languages better so that I can succeed in this field of programming!
Thank you in advance for all the input and advice!!
HTML CODE:
<div id="page">
<div id="header">
<h1><img src="http://wireless.fm.intel.com/test/logo2.png">
<h2>Mobility Group</h2>
</div>
<div id="main"></div>
<div id="footer"></div>
</div>
</body>
CSS CODE:
Html, body
{
Padding:0;
Margin:0;
Height:100%;
}
#page
{
Min-height:100%;
position:relative;
height:100%;
}
#header
{
background-color:#115EA2;
height:100px;
width:97.5;
}
#main
{
width:1300px;
margin-left:auto;
margin-right:auto;
background-color:#F1F2F3;
min-height:87%;
height:auto;
height:87%;
margin:0 auto -50px;
vertical-align:bottom;
}
#footer
{
Position:fixed;
Width:100%;
Bottom:0;
Height:50px;
background-color: #115EA2;
}
#header h1
{
position:absolute;
text-align:left;
left:0px;
top:0px;
}
#header h2
{
text-align:center;
font-size:44px;
color:#FFFFFF;
left:0px;
top:20px;
font-weight:bold;
}
I'm still not sure I understood the question, but here's what can you do to make it more natural looking. Close the h1 tag, don't make it absolutely positioned, but rather make it float left. The same thing goes to the h2 element. And since the original image is missing, I've put another one, and fixed its height to 60px.
It's basically this:
#header h1 {
text-align:left;
left:0px;
top:0px;
float: left;
}
#header h1 img {
height: 60px;
}
#header h2 {
text-align:center;
font-size:44px;
color:#FFFFFF;
left:0px;
top:20px;
font-weight:bold;
float:left;
}
See the results here: http://jsfiddle.net/AmKHx/1/ It should look the same in every modern browser.
Also, try not to use capital letters for CSS attributes - it's a standard to use lower case, and even some browsers might not like it.
Do you have a reset sheet?
Copy this to a new css file, call it reset.css and then load it in your page before you load your main css.
html{color:#000;background:#FFF}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0}
table{border-collapse:collapse;border-spacing:0}
fieldset,img{border:0}
address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal}
ol,ul{list-style:none}
caption,th{text-align:left}
h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}
q:before,q:after{content:''}
abbr,acronym{border:0;font-variant:normal}
sup{vertical-align:text-top}
sub{vertical-align:text-bottom}
input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit}
input,textarea,select{*font-size:100%}
legend{color:#000}
I cannot get this link to be clickable for the life of me. When I take it outside of the 'lb' div it functions. I've applied z-index values and it doesn't change anything. I'm about to rip my hair out. Some help, please.
<div id="lb">
<div id="cntct">
<div id="map">
This is a link
</div>
</div>
</div>
CSS
#lb
{
position:relative;
top:-50px;
z-index:-20;
background-image:url(../src/images/Lbkg.jpg);
background-repeat:no-repeat;
height:650px;
overflow:auto;
}
#cntct
{
position:relative;
top:70px;
background-image: url(../src/images/cntct.png);
background-repeat:no-repeat;
background-position:center;
height:400px;
width:1000px;
margin:auto;
z-index:-10;
}
#map
{
position:relative;
top:45px;
left:50px;
width:600px;
height:400;
z-index:5;
}
try taking the top style off it - hard to tell with only the code you have posted, but it may be pushing it out of the div, meaning that something else (that is transparent) is overlaying it, and intercepting the click.
If you're using firefox/chrome/etc, you can try to right-click on the link, and inspect element (or similar command) - should open the DOM browser with the element you clicked on selected. If the link isn't selected in the DOM (ie some other element is selected) then that element is on top of the link, intercepting clicks...
Please try it:
Remove z-index property for #lb and #cntct.
I want to keep a div on another div, which is linked to any site.
here is my css
.link_div a {
float:left;
width:80px;
height:20px;
background:yellow;
}
.over {
position:absolute;
left:0;
top:0;
background:red;
width:80px;
height:20px;
}
here is html
<div class="link_div"> HELLO </div>
<div class="over"></div>
Is this possible to keep "Over" div on top and link should be on ?
This is an awesome post:
Click through a DIV to underlying elements
Adding this css to your .over should do it:
pointer-events:none;
plus for IE:
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='your_transparent.png', sizingMethod='scale');
background:none !important;
You could get something like this then:
http://www.searchlawrence.com/click-through-a-div-to-underlying-elements.html
All credits go to this guy's post of course.