Solved

CSS help with layout

Posted on 2015-01-27
2
79 Views
Last Modified: 2015-01-27
Hi,

I have a design (attached)

design
How can i achieve the effect shown in designs where by the panels bleed off to one side.
i.e. the dark grey carries on all the way to the right side of the page

Thanks
0
Comment
Question by:coolispaul
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 38

Accepted Solution

by:
Tom Beck earned 500 total points
ID: 40572607
Here's one way to do it. Substitute your own images, decide how big to make them, choose your background colors.
<!DOCTYPE html>
<html>
    <head>
        <title>Resize Problem</title>
        <meta charset="UTF-8">
        <style>
		* {margin: 0 auto; padding:0}
		body {text-align: center}
		section {margin: 15px 0}
		section.right {background: linear-gradient(to left, #444 50%, transparent 50%)}
		section.left {background: linear-gradient(to left, transparent 50%, #fed 50%)}
		section article {max-width: 600px; display: table}
		section.right article {background-color: #444}
		section.left article {background-color: #fed}
		article div {float: left}
		article div img {float:left; width: 150px; height: 150px}
		article div span {display: table-cell; padding: 15px}
		section.right article div span {color: #fff}
		section.left article div span {color: #444}
		section.right div img {float: left}
		section.left div img {float: right}
        </style>
    </head>
    <body>
    <section class="right">
    	<article>
            <div><img src="img/IMG_2.JPG" alt="" />
            	<span>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.</span> 
            </div> 
        </article>
    </section>
    <section class="left">
    	<article>
            <div> 
                <img src="img/IMG_2.JPG" alt="" />
            	<span>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.</span>
            </div> 
        </article>
    </section>
    
    </body>
</html>

Open in new window

0
 

Author Comment

by:coolispaul
ID: 40572622
cool thanks
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
write html in textarea and record it into a database table 3 43
CSS Formatting Getting Stripped 1 35
Set css in function 11 56
CSS background-color 5 22
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question