473,804 Members | 3,894 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

floating image and content

Hello,

ive been recently appointed to transforming our table-full site into a
nice accessible and table-free website.

to make the story short, everything was going rather smoothly until i
got this issue with all browsers.

basically, im trying to float a picture on the left side of a
paragraph.

its pretty easy but it gets tricky when we make the text bigger (using
the ctrl-mouse wheel for instance)

all of my pages are somewhat like this....
<div id="container"< !-- padding :10px -->
<div id="ie_wrapper" <!-- float : left -->
<div id="content"<!-- left-margin : 150px; -->

<!-- all of the above is working, this is just to give a picture of how
things are layed out -->
<!-- this is what is not working exactly as intended -->
<div style="float:le ft; width:50px;><im g src="some picture" /></div>
<div style="margin-left: 55px"><h2 style="display: inline">This is
some content</h2></div>

<div style="float:le ft; width:50px;><im g src="some picture" /></div>
<div style="margin-left: 55px"><h2 style="display: inline">This is
some more content</h2></div>

<div style="float:le ft; width:50px;><im g src="some picture" /></div>
<div style="margin-left: 55px"><h2 style="display: inline">This is
some even more content</h2></div>
<!-- all the code below is working too -->
</div>
</div>

<div id="navigation" ></div<!-- left-margin : -100%; width:150px;
-->

</div>

basically what im trying to achieve is to have the picture be a box and
the content be a box and when the next set of picture/content is
displayed that it does not indent with the previous one.

(you might want to view this in notepad for a better view)

- How it should be :

****** *************** **************
* * *************** **************
******

****** *************** *************** ************
* * * *
****** * *
* *
*************** *************** ************

- How it is :

****** *************** **************
* * *************** **************
****** ****** *************** *************** ************
* * * *
****** * *
* *
*************** *************** ************

Below is my style sheet (a small part of it)

@import url("Interdec_S tyle.css");
@import url("controls/controls.css");

/* ************ Stylesheet positioning classes *************** *** */
html,body, form {
margin :0;
padding :0;
}

div { display : block;}

div#footer p {
margin :0;
padding :5px 10px;
}

div.wrapper {
float : left;
width : 100%;
}

div.content {
margin-left : 150px;
display : inline;
float : left;
}

/*
div#navigation {
float : left;
width : 150px;
margin-left : -100%;
}
*/

div#extra{
clear : left;
width : 100%;
}

div#container {
min-width:600px;
padding: 10px;

}
..white_bg {
background : #fff;
}

..small_padding {
padding : 5px;
}

..medium_paddin g {
padding : 10px;
}

#main_table {
display:block;
padding: 1px 20px 1px 20px;
background:#ccc ccc;
}

div#bottom_main _border {
float:left;
width:100%;
background:#ccc ccc;
margin-bottom : 15px;
}

..floatLeft {
float:left;
}

..floatRight {
float:right;
}

..footer {
float:left;
width:100%;
margin-top : 5px;
}

/* ********** Summaries positioning (shared) *************** * */
div.Summary_Ind ent {
float:left;
width : 23px;
}

div.Summary_Con tent {
margin-left : 30px;
height:40px;
}
/* *************** *************** *************** ************* */

Nov 20 '06 #1
1 2553
En****@gmail.co m writes:
Hello,

ive been recently appointed to transforming our table-full site into a
nice accessible and table-free website.

to make the story short, everything was going rather smoothly until i
got this issue with all browsers.
<html snipped>
>
- How it should be :

****** *************** **************
* * *************** **************
******

****** *************** *************** ************
* * * *
****** * *
* *
*************** *************** ************

- How it is :

****** *************** **************
* * *************** **************
****** ****** *************** *************** ************
* * * *
****** * *
* *
*************** *************** ************
It looks for all the world as if you just need "clear: left;" in the
style for the divs that contain the imgs.

If that was not it, put up a live example page. You'll find people
here prefer a posted URL as that makes testing much easier and the
problem much clearer.

--
Ben.
Nov 21 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3400
by: Chris Gurk | last post by:
Hi Newsgroup, I am working on a website http://www.charter-yachtcharter.com/testsite/ (still in progress). There are two lists. The first is a simple paragraph (<p>-Tag), the second an unordered list. How can I use a Style-Sheet to format the bullets to be aligned like the text above. The problem is the floating catamaran-image which is floating left around the first paragraph on this site.
8
25469
by: | last post by:
How do you center, like I am trying to do, below the group of images? Why does it not work? Example: <div><h2>The Title</h2><img src="images/BigPicture.jpg" height="150px" width="250px"></div> </div> <div align="center"> <div style="float:left; height:121px; width:180px; border: solid yellow"><img src="images/1.jpg"></div>
2
16201
by: fleemo17 | last post by:
I thought this would be very simple to set up in CSS, but I'm having difficulty making it work in several browsers. I'd simply like to have an image float at the upper right hand corner of my web page. If the browser is expanded, the image would cling to the browser's right edge, remaining in the upper right hand corner regardless of the window size. I attempted this using the following CSS: img.photofloat { position: relative; top:...
18
5730
by: day | last post by:
I know I've seen this issue described before, but I can't find it, or the solution now that I need it. I have some css-specified floating divs that contain images or text. The text divs have a background color and text color that differ from the rest of the page, and I'd like them to be positioned from the right edge of the rightmost image div, to the right edge of the browser window. In other words, if the browser window is 800 pixels...
3
9258
by: Oliver Bryant | last post by:
I just finished developing a javascipt component allowing floating captions to appear over HTML elements. If anyone wants to check it out you can see specs and download it from http://boxover.swazz.org. There is a demo there as well.
3
1581
by: Veerle | last post by:
I have the following html: <table cellpadding="0" cellspacing="0" width="850"> <tr> <td> <div id="messagebox"> <div class="Dialog"> <div class="DialogHeader">Fouten</div> <div class="DialogBody"> ...
6
1889
dreamcatcher
by: dreamcatcher | last post by:
Hi there, I've a problem with IE 6 floating an image to the right of some body content which is contained in a p tag which is followed by a level 3 heading and a list. The floated image works fine in the ever dependable Mozilla, i.e. the content aligns neatly along the left hand side of the image. The thing is there's a gap between the first paragraph and the next level 3 heading. I know it's an IE problem, does anyone have a solution for...
31
2980
by: Martin Clark | last post by:
Hello, I am daring to stick my head above the parapet and ask as question. I am working on redesigning a website to use CSS rather than tables for layout. I have come across a problem when trying to float an image to the right. For ease of looking at the problem, I have stripped away other parts of the page layout, and have just included the "content" section in the examples below. The basic design of having a left column and a main...
6
2529
by: Jeremy | last post by:
I've got a floating div which becomes visible when a link is clicked. I want the div to be hidden when the user clicks anywhere on the page except for whithin the div. What is the best way to do this? Really, I only need to support ie6+ but cross browser is always nice.
0
9589
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10593
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10085
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6858
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5527
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4304
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
3
3000
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.