473,467 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

clear: left clearing a separate div as well

16 New Member
I have taken over a site which I am trying to tidy up and update whilst learning the arcanities of CSS (particularly in relation to IE).

Below the header banner image and horizontal menu is the main section, which consists of a sidebar with mostly internal links and a content section with images and descriptions of items that are for sale.

The difficulty I am having is persuading a new paragraph to begin below a left-floated image rather than beside it. If I use <p class="clear: left"> it clears not only the image but also the whole of the content of the sidebar, leaving a big gap in the text.

This happens in all seven browsers I've been testing in (Safari 1.3.2, IE5.2/Mac, Firefox 2.0.0.1/Mac/Win, Opera 9.10/Mac/Win and IE6/Win). I'm using Virtual PC to view the Windows versions as I only have a Mac.

#sidebar and #content are enclosed in a div named middlewrap, and I've checked by using coloured borders that they don't overlap. I have no idea what I am doing wrong. Here is the link:

http://www.goddess-gift.co.uk/test/goddess-gift_test/

I can also post the code here if that will help.

Can anyone help me, please? I'm probably doing something really obviously wrong, but I just can't see what, and I can't find anything to help me online. Remember that I have inherited this site and so I don't entirely understand what is going on with the layout...

Helen
Jan 29 '07 #1
4 2189
AricC
1,892 Recognized Expert Top Contributor
Going to lunch will fix in an hour or so unless someone gets to it before me, let me clarify are you talking about the image that is currently not showing you want the text to go just below that image?

Aric
Jan 29 '07 #2
wavedancer
16 New Member
Going to lunch will fix in an hour or so unless someone gets to it before me, let me clarify are you talking about the image that is currently not showing you want the text to go just below that image?

Aric
Thank you, Aric. I would like the text beginning 'Semi-precious stones and crystals...' to go just below the image of the smudge sticks in the second paragraph. It's currently starting level with just below the sidebar, and it needs to move up to fill in the space.

(Obviously the text is out of date but I need to know for when I put in the new text.)

Helen
Jan 29 '07 #3
AricC
1,892 Recognized Expert Top Contributor
Ok, a few things why do you have comments around so many tags? Also why are you clearing anything thing by default a new paragrap <p> tag should give you a new line. Also, I think you'd be better off getting rid of this <if IE> stuff and make 1 style sheet for all of your pages the way it looks you will be creating several different style sheets for each page and you don't want to do that.


Aric
Jan 30 '07 #4
wavedancer
16 New Member
Ok, a few things why do you have comments around so many tags? Also why are you clearing anything thing by default a new paragrap <p> tag should give you a new line. Also, I think you'd be better off getting rid of this <if IE> stuff and make 1 style sheet for all of your pages the way it looks you will be creating several different style sheets for each page and you don't want to do that.


Aric
I inherited the style sheets along with the rest of the site, and I'm trying to tidy it up and make it work. Most of the comments are a reminder of what does (or is supposed to do) what. Some things may have been commented right out because I didn't write them but I'm not sure whether at some point they will turn out to be necessary. There are also dotted borders that are commented out; I unhide them if I need to see how two or more divs relate to each other.

I don't know how to put it all on one style sheet and get IE to follow its own instructions while the other browsers stick to the rules. The separate IE style sheet came with the site as well. In fact, there were three style sheets to begin with: one called themes/index.css, which is obviously what the designer uses to base all his websites on, as they are all very similar in layout, one called layout.css which in some places conflicted with the first one, and a third one called ie6.css which was written specifically for Internet Explorer. I have no idea at all what all the * html and body>div# stuff means – and would be very grateful for any links to online resources that would explain it – so I have left it. By going line by line through the other two style sheets, I have been able to work out what to keep and what to discard, and to merge them into one. If you are able to suggest ways of further pruning what is left, I'll be very grateful. I am very new to all this, and it does feel like a baptism of fire.

I know that a new <p> tag will start the next sentence on a new line, but that's not necessarily going to be below the image. If I replace <p class="clear: left"> with a simple <p> tag, the new paragraph will begin next to the image, not underneath it where I want it to be.

Are you able to explain to me why "clear: left" also clears the content of the <div> next door, which is quite separate? Am I doing something wrong?

Thank you, Aric. I appreciate the trouble you have taken.

Helen
Jan 30 '07 #5

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

Similar topics

18
by: Tim Mierzejewski | last post by:
How do I clear the text from my screen, other than a bunch of \n's or endl's? Tim M.
4
by: Florian Brucker | last post by:
Hi! I've got a problem with float & clear. Take this example code: <div style=" width:100px; height:100px; background-color:#FF0000; float:left; margin:10px;"></div> <span...
0
by: Eric Promislow | last post by:
Has anyone else run into this? The problem is that I'm loading one schema at a time, to be displayed in a TreeView. Each node in the tree points to an item in the schema via the Tag property. ...
5
by: Davids | last post by:
when using the page to POST (from a form) I want the page's querystring to be cleared, how do I do that?
3
by: ffrugone | last post by:
I am creating a blog and I have a problem which seems fairly common: Within the content of the posts I sometimes have floated images. The comments bar that follows each post will not clear the...
4
by: shapper | last post by:
Hello, Consider the following design: <div id="container"> <div id="A" class="A"></div> <div id="B" class="B"></div> </div> And the CSS classes:
18
by: Marko.Cain.23 | last post by:
Hi, I create a dictionary like this myDict = {} and I add entry like this: myDict = 1 but how can I empty the whole dictionary? Thank you.
34
by: pamela fluente | last post by:
I would like to hear your *opinion and advice* on best programming practice under .NET. Given that several time we cannot change: MyCollection.Clear into the instantiation of a NEW...
5
by: karsagarwal | last post by:
I have a bounded form and after I click the button to update/save. THe fields are still there. Is there a way to clear off the fields in the bounded form. Thanks, SA Here's the code that I...
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
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.