473,419 Members | 1,822 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,419 software developers and data experts.

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:left; width:50px;><img src="some picture" /></div>
<div style="margin-left: 55px"><h2 style="display:inline">This is
some content</h2></div>

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

<div style="float:left; width:50px;><img 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_Style.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_padding {
padding : 10px;
}

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

div#bottom_main_border {
float:left;
width:100%;
background:#cccccc;
margin-bottom : 15px;
}

..floatLeft {
float:left;
}

..floatRight {
float:right;
}

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

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

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

Nov 20 '06 #1
1 2535
En****@gmail.com 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
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...
8
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>...
2
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...
18
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...
3
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...
3
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...
6
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...
31
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...
6
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...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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...
1
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...
0
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...

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.