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

CSS Layout Problems

Rob
I am just venturing into the world of pure CSS layouts. Although I am
enjoying it so far, I have come across an issue that really has me
stumped.

The main body of my page is set out using a container div which has
inside it to further divs left and right. I want the left div to have a
grey background and the right to have white background.

Originally I gave the left div the grey background and left the right
div as my page body was set to white. This caused a problem if the
right div has more content the grey border on the left div didn't
continue to the bottom of the page.

I though I had the answer make the container div grey and the right div
white. Problem solved in Netscape and FireFox, but in IE even though I
have all my width and margins right it seems to think that the div is
to wide to fit, and pushes it down.

I'm probably missing something really simple and I hope that you
understand what I'm trying to say, if not have a look at the below
link it might help.

http://www.platforum.co.uk/training/training.htm

Thanks for taking the time to read this

Rob

Aug 18 '06 #1
4 1247
On 18 Aug 2006 08:49:38 -0700, "Rob" <ro****@platforum.co.ukwrote:
>I though I had the answer make the container div grey and the right div
white. Problem solved in Netscape and FireFox, but in IE even though I
have all my width and margins right it seems to think that the div is
to wide to fit, and pushes it down.

I'm probably missing something really simple and I hope that you
understand what I'm trying to say, if not have a look at the below
link it might help.

http://www.platforum.co.uk/training/training.htm

Thanks for taking the time to read this
I'm not sure, but I think you're suffering from the notorious IE 3px-jog
bug. Try making the left-margin of the right-hand div 5px wider and see
if that helps.

When you've done that, work on sizing the elements in relative units
(ems or %) rather than pixels, so that the layout adjusts gracefully to
different window sizes and text sizes.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Aug 18 '06 #2

Rob wrote:
I am just venturing into the world of pure CSS layouts. Although I am
enjoying it so far, I have come across an issue that really has me
stumped.

The main body of my page is set out using a container div which has
inside it to further divs left and right. I want the left div to have a
grey background and the right to have white background.

Originally I gave the left div the grey background and left the right
div as my page body was set to white. This caused a problem if the
right div has more content the grey border on the left div didn't
continue to the bottom of the page.

I though I had the answer make the container div grey and the right div
white. Problem solved in Netscape and FireFox, but in IE even though I
have all my width and margins right it seems to think that the div is
to wide to fit, and pushes it down.
Hi Rob,

Im only just getting to grips with CSS myself, so this is only an idea.

If you've applied padding or margins to the two inner divs (left and
right) its could make the total width larger than your main container
div??

Id try reducing the width of the right div (a few pixels at a time) and
see what happens.

Hope this makes sense?? Like I said - still learning the basics myself!

Mark.

Aug 18 '06 #3
>but in IE even though I
have all my width and margins right it seems to think that the div is
to wide to fit, and pushes it down.

Rob
try this:

#divBodyRight {
width: 510px;
width: expression("505px");
}

Only IE processes understands "EXPRESSION", and it usually helps to
make the div smaller by 5px for IE.

Hope that helps

Hiazle

Aug 18 '06 #4
Rob

hiazle wrote:
but in IE even though I
have all my width and margins right it seems to think that the div is
to wide to fit, and pushes it down.

Rob

try this:

#divBodyRight {
width: 510px;
width: expression("505px");
}

Only IE processes understands "EXPRESSION", and it usually helps to
make the div smaller by 5px for IE.

Hope that helps

Hiazle

Thanks Hiazle

Thats it!!!

Problem solve, youve made my day.

Thanks as well to all you other guy that took the time to help.

Have a good weekend

Rob

Aug 19 '06 #5

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

Similar topics

82
by: Peter Diedrich | last post by:
The site design is pretty simple: ============================================ | Head | ============================================ | | ...
39
by: Zak McGregor | last post by:
Hi all Are there any good solutions to aligning form field names and input boxes without resorting to tables? I am struggling to do this nicely at the moment. Thanks Ciao Zak
2
by: CJM | last post by:
I'm developing a site for a charity which I am aiming to make standards-compliant, accessible and cross-browser compatible. I'm doing OK so far and have the workings of a respectable site, but I...
22
by: Jam Pa | last post by:
Once again my big mouth has landed me with a tough job. I have a static CSS layout, where each and every element has been defined by pixel size - lots of them, too! Mostly relative elements,...
20
by: Tammy | last post by:
What would be a good alternative to using frames? I need something that will section my webpage into two halves and can change both frames on a single click. Thanks in Advance, Tammy
30
by: Diane Wilson | last post by:
I'm trying (once again) to figure out how to make a robust CSS layout style that can replace tables. I'd like to be able to do a basic two-column layout, with a one-column header, a two column...
14
by: Anoop | last post by:
Hi, I am new to this newsgroup and need help in the following questions. 1. I am workin' on a GUI application. Does C# provides Layout Managers the way Java does to design GUI? I know that it...
15
by: Gary Peek | last post by:
Can anyone tell us the browsers/versions that exhibit errors when tables are nested too deeply? And how many levels of nesting produces errors? (not a tables vs CSS question)
5
by: Jeff User | last post by:
Hi all I am writing program/framework to server a web site dynamically based on stored web page data with C#, .net1.1 What is the preferred means of controlling page layout, frames or...
26
by: mark | last post by:
The idea of this is very simle. The site is 800px wide and sits in the middle of the browser window, on either side of the site I want a different background image aligned against it. If I were...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.