Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    GIF shows where to locate </> in the thread and or post editor toolbar.
    To learn more about how to use our BBCode feature, review our "How to post your code into threads" here.

    Thank you, Code Forum.

I can´t get the boxes where I want them

Scorpion

Coder
I want the IFrame on the left and the content on the right

CSS:
 .content-right{
  background-color: black;
  color: white;
  margin: 20px;
  position: relative; left: 150px; top:60px; width: 100px; height:200px;
}


  .content-iframe{
  background-color: white;
  color: white;
  margin: 20px;
  position: absolute; left: 50px; top:60px; width: 30%; height:300px;
}

HTML:
<div class="content">

<div class="content-iframe">

<iframe height="70%" padding="10" width="100%">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</iframe>

</div>

<div class="content-right">

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

</div>


</div>
 
Try using flex on the parent element and removing the position from both child elements:
CSS:
.content {
  display: flex;
}
That worked in some way, the position is right on ff and chrome on the computer but not on the phone and i can´t move the content position in my divs, and i still don´t se the lorem ipsum in my IFrame
 
HTML:
<html>
<head><meta charset="utf-8">
    <link href="/Inc/index.css" rel="stylesheet" />
    <link href="/Inc/links.css" rel="stylesheet" />

<title>Scorpion.nu</title>
</head>
<body>
    
    
<div class="banner">
<h1>Banner</h1>

<p>Plats för banner</p>
</div>

<div class="menu">
<h2>Meny</h2>
<a href="index.html">Hem</a><br />
<a href="/img/index.html">Bilder</a><br />
<a href="mail/index.html">Kontakt</a></div>

<div class="content">

<div class="content-iframe">

<iframe height="100%" padding="10" width="100%">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</iframe>

</div>

<div class="content-right">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>


</div>
</body>
</html>

CSS:
.banner{
  background-color: tomato;
  color: white;
  margin: 20px;
  position: absolute; left: 5px; top:10px; width: 89%;
}

  .menu{
  background-color: tomato;
  color: black;
  margin: 20px;
  position: absolute; left: 5px; top:180px; width: 20%; height:300px;
}

  .content{
  background-color: tomato;
  color: white;
  margin: 20px;
  display: flex;
  position: absolute; left: 25%; top:180px; width: 67%; height:400px;
}

 .content-right{
  background-color: tomato;
  color: black;
  margin: 20px;
  left: 250px; top:60px; width: 500px; height:200px;
}

  .content-iframe{
  background-color: tomato;
  color: black;
  margin: 20px;
  left: 350px; top:60px; width: 100%; height:100%;
}
 
but not on the phone
Can you take a screenshot of what you see on a phone?

i can´t move the content position in my divs
How are you trying to move the content?

i still don´t se the lorem ipsum in my IFrame
I think what is inside an iframe only shows if iframe's aren't supported by the browser, I'm not sure. But what you want in the iframe should be a link in the src attribute:
HTML:
<iframe src="https://example.com"></iframe>

If you just want a text box, use a normal p or div element, and style it with CSS, or use the textarea element with the readonly attribute.
 
The menu seems to be there for me. Or do you mean on mobile?

There shouldn't be any picture according to your HTML, or do you mean the iframe?
 
The menu seems to be there for me. Or do you mean on mobile?

There shouldn't be any picture according to your HTML, or do you mean the iframe?
I´ve done some changes, On the index-side, there is a problem with the placement on the right content, on the image side, the images are visible but the background color do not extend under the images
 

Latest posts

Buy us a coffee!

Buy me a coffee.
Back
Top Bottom