John A John A - 1 year ago 77
CSS Question

Creating a Website Landing Page with Inline Elements

I am trying to create a header with two inline elements in it, picture and text. What I'm going for (I circled the two elements):

Landing Page with Inline Elements

How would I go about this? I tried floating the text to the right, but it takes up the whole screen (not resizing).

Answer Source

If I understood correctly, there should be an image towards the left and towards the right end of the image, there should be a descriptive text?

If that is the case, (among the many) one option is to give a margin-left to the element which holds the text and we should know the size of the image to do it correctly:

.header {
  background: url("") no-repeat;
.content {
  margin-left: 355px;
<div class="header">
  <div class="content">
    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has
    survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing
    software like Aldus PageMaker including versions of Lorem Ipsum. End!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download