0

I want to create a page as shown in this picture, but it is not displaying the same.

enter image description here

#addcontainer {
  width: 100%;
}
#addprimary {
  float: left;
  max-width: 125px;
}
#addsecondary {
  float: right;
  width: 125px;
}
#addcontent {
  margin: auto;
  width: 740px;
  height: 390px;
  background: url(../img/home_page/home.jpg);
}
<div id="addcontainer">
  <div id="addprimary">
    <ul>
      <li>
        <a href="#home">
          <img src="https://www.seoclerk.com/pics/183798-18HhJR1392119968.jpg">>
        </a>
      </li>
    </ul>
  </div>
  <div id="addcontent">
  </div>

  <div id="addsecondary">
    <ul>
      <li>
        <a href="#home">
          <img src="https://www.seoclerk.com/pics/183798-18HhJR1392119968.jpg">
        </a>
      </li>
    </ul>
  </div>
</div>

0

3 Answers 3

1

You should use like this -

img{
  max-width: 100%;
}
ul{
  margin:0;
  padding:0;
}
li{
  list-style:none;
}

#addcontainer {
  width: 100%;
}
#addprimary {
  float: left;
  max-width: 125px;
  
}
#addsecondary {
  float: right;
  width: 125px;
}
#addcontent {
  margin: auto;
  float: left;
  /*width: 740px;*/
  width: calc(100% - 250px);
  height: 390px;
  background: url(http://img.reflex.cz/img/3/full/2394140-img-windows.jpg) no-repeat center center;
  background-size:  740px 390px; 
}
<div id="addcontainer">
  <div id="addprimary">
    <ul>
      <li>
        <a href="#home">
          <img src="https://www.seoclerk.com/pics/183798-18HhJR1392119968.jpg">
        </a>
      </li>
    </ul>
  </div>
  <div id="addcontent">
  </div>

  <div id="addsecondary">
    <ul>
      <li>
        <a href="#home">
          <img src="https://www.seoclerk.com/pics/183798-18HhJR1392119968.jpg">
        </a>
      </li>
    </ul>
  </div>
</div>

Sign up to request clarification or add additional context in comments.

Comments

1

I Think you should use boostrap , if you need custom class then you can just re-work any bootstrap class you want.

In bootstrap it will look like this :

<div class="col-md-12">  
  <div class="col-md-2">
  left side
  </div>
  <div class="col-md-8">
  middle
  </div>
  <div class="col-md-2">
  right side
  </div>
</div>

Comments

0

css :

img{
  max-width: 100%;
}
ul{
  margin:0;
  padding:0;
}
li{
  list-style:none;
}

#addcontainer {
  width: 100%;
}
#addprimary,#addsecondary  {
width:18%;
    display:inline-block;
    vertical-align:top;

}

#addcontent {
    margin:0 20px;
 display:inline-block;

  width: 55%;
  height: 390px;
  background: url(http://www.personal.psu.edu/afr3/blogs/siowfa13/Tigers-animals-20238015-2493-1983.jpg) no-repeat;
  background-size:  100% 100%; 
}

http://jsfiddle.net/souraj/t2rx7n0c/

you can use display:inline-block to display the elements.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.