473,563 Members | 2,767 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Clear in one div affects second div

2 New Member
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 1735
shadowstrike
21 New Member
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
cebristow
2 New Member
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
shadowstrike
21 New Member
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
shadowstrike
21 New Member
If it answers your question please do close the ticket.
Aug 27 '13 #5
Phyo Thinza
2 New Member
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
2165
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 section. I can't find anything in the 4.0 spec about how to do this, and the only mention in this group I found is from 1998 below (CERN blocked my...
34
4399
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: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3
6875
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 from rsSource into rsDest - if it finds a key violation then it deletes the current record from rsDest and adds the new record from rsSource. This...
1
6203
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. /*****************************************************************/ #include<iostream> #include<algorithm> #include<vector>
4
13796
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 it always comes back quickly after the first run? I assume the query/data/plan is in cache - how can I clean it out for my session? Thanks in...
28
2637
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 since my degree is in physics simulations and my career is in programming and i happened to have a simulation generator i have been building i...
4
5506
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 <div> columns, meaning that each <divis not autonomous, they interact with each other when clear: styles apply.
15
7056
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 every second. I remote desktop to the computer hosting this application and run the application. It starts up and displays the counter...
0
1454
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 the reported docking state for portable computers with docking stations. The system generates a GUID for each hardware profile and stores it as...
0
7583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7888
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7642
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1200
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.