Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

CSS help with layout

Posted on 2015-01-27
2
Medium Priority
?
84 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
2 Comments
 
LVL 38

Accepted Solution

by:
Tom Beck earned 2000 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

824 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