473,395 Members | 1,484 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Clear in one div affects second div

I have a two column layout. Each column contains a series of paragraphs that contain a lift aligned image and 1-2 lines of text.I have used clear:both on the p tag to prevent subsequent images from stacking horizontally (keeping all images to the left side. This works fine in the left hand column. When I do the same in the right hand column, all the content of the right-hand column is pushed down below the content of the left-hand column. Any way around this?
Aug 24 '13 #1
5 1731
Can you share an image of what you are trying to acheiv?As far as what I can think of from your statement,you are trying to align image to the left side and paragraph element on the right side.So the easist way which it can be achiev is by applying float property.But still please do send me an image of what you are trying to acheiv
Aug 24 '13 #2
Here is the page in question.
Http://bio.illinoisstate.edu/research/labs.aspx
You can see that the content in the right hand column is pushed down below that of the left.

I have limited editing capabilities . I have added the page styles for
#twocolumnleft p and #twocolumnright p. without those styles, the second picture wraps andappears to the right of the first image.

I know I could achieve the desired result with a table, but jaws hoping to avoid that if possible.

Thanks for any suggestions.
Aug 24 '13 #3
Hi based on the web I created a small template of a id card.Diffrerent div are used for different purposes.Please do have a look at it.Incase if it help you out lemme know.And one thing,never use tables for such type of creation.Always use div
Expand|Select|Wrap|Line Numbers
  1. <body>
  2.  
  3. <style type="text/css">
  4. *{
  5.     margin:0px; 
  6. }
  7. .wrapper{
  8.     width: 420px;
  9.     height:250px;
  10.     overflow: scroll;
  11.     border: 5px solid;
  12.     resize:both;
  13.     margin: auto;
  14. }
  15.  
  16. .id_card{
  17.     width:400px;
  18.     height:70px;
  19.     background-color:#4dbbb5;
  20. }
  21.  
  22. .id_card .photo{
  23.    position: relative;
  24.     margin-left: 10px;
  25.     margin-top: 15px;
  26.     width: 75px;
  27.     height: 45px;
  28.     background-color: green;
  29.     top: 0px;
  30.     float: left;
  31. }
  32. .id_card .desc{
  33.     position: relative;
  34.     background-color: red;
  35.     width: 290px;
  36.     height: 45px;
  37.     margin-left: 100px;
  38.     top: 15px;
  39.  
  40. }
  41.  
  42.  
  43.  
  44. </style>
  45. <div class="wrapper">
  46.     <div class="id_card">
  47.         <div class="photo">Add<br/>Image
  48.         </div>
  49.         <div class="desc">Add<br/>Description
  50.         </div>
  51.     </div>
  52.     <br>
  53.     <div class="id_card">
  54.         <div class="photo">Add<br/>Image
  55.         </div>
  56.         <div class="desc">Add<br/>Description
  57.         </div>
  58.     </div>
  59.     <br>
  60.     <div class="id_card">
  61.         <div class="photo">Add<br/>Image
  62.         </div>
  63.         <div class="desc">Add<br/>Description
  64.         </div>
  65.     </div>
  66.     <br>
  67. </div>
  68. </body>
  69.  
Aug 26 '13 #4
If it answers your question please do close the ticket.
Aug 27 '13 #5
I think, you should write float:none; in right hand div style tag..
Sep 10 '13 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: David Pautler | last post by:
I'm creating a web-based authoring tool where one form encompasses several sections for editing. I'd like each section to have its own reset button, so that use of that button affects only that...
34
by: The Good Son | last post by:
I'm trying to get my head around a problem that has me baffled. The following element: #wrapper {border:1px solid #000;background:#fff;} Renders as expected when using this DTD: ...
3
by: Nathan Bloomfield | last post by:
Hi there, I am having difficulty with a piece of code which would work wonders for my application if only the error trapping worked properly. Basically, it works as follows: - adds records...
1
by: AD | last post by:
Hi I am trying to read elements of a vector from console (cin) in two steps ie, read a list of numbers from cin. Sort these. Then read from cin again and append in same vector. ...
4
by: traceable1 | last post by:
I am trying to improve the performance of a query. No matter how bad it runs the first time, it runs really fast the second time. So how can I tell if I've done anything to improve the query if...
28
by: galathaea | last post by:
On Mar 2, 11:29 pm, galath...@veawb.coop (galathaea) wrote: still being very naive about this whole crackpot / crank thing i accidentally let the engineer inside think too hard about this ...
4
by: Jim Carlock | last post by:
I'm working with three column layouts without tables. The page in question... http://www.microcosmotalk.com/images/garden/vine.asp Using clear:both; causes problems in the left and right...
15
by: =?Utf-8?B?TVNU?= | last post by:
To demonstrate my problem, I have a very simple VB Windows application. It has a text box that is used to display a counter, a button to reset the counter, and a timer that increments the counter...
0
by: edu1982edu | last post by:
MSDN on GetCurrentHwProfile: Remarks The GetCurrentHwProfile function retrieves the display name and globally unique identifier (GUID) string for the hardware profile. The function also retrieves...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.