Solved

responsive DIV columns

Posted on 2014-03-30
1
313 Views
Last Modified: 2014-05-02
i am building a new site and a sample page with the issue at hand on the dev url is http://serv7wkdcxic.sn.sourcedns.com/~yacht/wpsite/listings/royal-princess.

The site overall is responsive, but I put in a DIV with two columns and the second column, when it shrinks down, doesn't drop below the first but moves on top of it.  In this case it is text running over a picture.

What do I do so the text would drop below the image?

The css is below.

.yacht-details {

	background-color: #f5f5f5;

	font-size: 16px; 
	
	line-height: 2em ; 

	overflow: hidden;

	margin: 0 0 30px;

	padding: 15px 20px 0;

}



.yacht-details-col1,
.yacht-details-col2{

	float: left;

	margin: 0;

	padding: 0 0 15px;

	width: 50%;

}

Open in new window

0
Comment
Question by:dougfosterNYC
[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
1 Comment
 
LVL 5

Accepted Solution

by:
Neil_Bradley earned 500 total points
ID: 39965441
Hi Doug,
you could simply write a media query to counteract the floating nature of your 2 divs when the screen soze drops below a certain size. Something like this
@media only screen and (max-width: 960px)
.yacht-details-col1, .yacht-details-col2 {
float: none;
width: 100%;
}
}
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Title # Comments Views Activity
PHP Web Development 6 70
CSS (jquiry mobile) question 3 34
object method as an event handler 8 77
Best explanation of following code css 11 40
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will learn how to count occurrences of each item in an array.

751 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