I am having a problem with padding. I have three boxes and I want them
all to be the same width. In IE it looks like the outside of the DIV
stays put and the padding is placed on the inside, so the bottom box
lines up with the middle box - which is what I want. In FF it looks like
the padding is making the DIV grow to the size of the padding and the
boxes then don't line up. If I take the padding out, then the boxes are
the same width, but then the text is jammed against the edges.
The link is: http://www.giftbasketsandtrinkets.com
I believe the problem is with the "content" id, but no amount of
tinkering has made it any better.
Any help will be greatly appreciated! 5 2198
Mike http://www.giftbasketsandtrinkets.com
You are running the browser (IE) in qurks mode, where it reproduces the
broken box model from prior versions. Google for "quirks mode".
--
Richard.
Mike wrote:
I am having a problem with padding.
Cut down on the beer, then. Har!
I have three boxes and I want them
all to be the same width. In IE it looks like the outside of the DIV
stays put and the padding is placed on the inside, so the bottom box
lines up with the middle box - which is what I want. In FF it looks like
the padding is making the DIV grow to the size of the padding and the
boxes then don't line up. If I take the padding out, then the boxes are
the same width, but then the text is jammed against the edges.
The link is:
http://www.giftbasketsandtrinkets.com
I believe the problem is with the "content" id, but no amount of
tinkering has made it any better.
Well, despite your subject line, it's not a FF padding problem.
First, if you're going to compare IE with FF, get yourself out of quirks
mode (q.G.) and into standards mode. Drop the transitional doctype and
go for 4.01 strict.
And since you're using HTML and not XHTML, clean out the /endings in
your code.
And since you didn't notice the endings, you should probably learn
validate your code and CSS.
And now to the tiny little detail of your problem, which you have all
but solved yourself already:
Change the width you defined for #content to width:680px.
The "why" is the broken box model (q.G.) IE uses in quirks mode.
Remember, too, though, that specifying width for text elements in px
like this is not a great idea. First of all, users of IE (<7) won't be
able to read your text in all cases, because you have hard-coded a small
size. In real browsers, however, changing the font size will break your
design (your three boxes will still -- steadfastly -- remain the same
size, but your menu will overflow the space you've provided. Watch out!
HTH
--
John
Richard Formby wrote:
>
You are running the browser (IE) in qurks mode, where it reproduces the
broken box model from prior versions. Google for "quirks mode".
Hmm, I'm either too slow or too verbose. :-)
--
John
In article <RqDMh.15914$1a 6.3353@trnddc08 >,
Mike <mm**@earth.net wrote:
I am having a problem with padding. I have three boxes and I want them
all to be the same width. In IE it looks like the outside of the DIV
stays put and the padding is placed on the inside, so the bottom box
lines up with the middle box - which is what I want. In FF it looks like
the padding is making the DIV grow to the size of the padding and the
boxes then don't line up. If I take the padding out, then the boxes are
the same width, but then the text is jammed against the edges.
The link is:
http://www.giftbasketsandtrinkets.com
I believe the problem is with the "content" id, but no amount of
tinkering has made it any better.
Any help will be greatly appreciated!
I did notice that it looked odd that your top box was not the
same size as the others below and I was able to fix easily by
altering the width (in FF on a Mac). But I am reluctant to get
into this matter as cross browser, cross platform success with
your fixed width code is not what I would attempt.
It looked "reasonable for a short range of font-size clicks in FF
with:
#content {
....
margin: auto;
....
}
#page_heading {
width: 760px;
....
}
and
#globalnav {
width: 760px;
....
height: 2.5em;
....
margin: auto;
....
}
But really, this is just fiddling about and I have not looked
deep into the matter with your hacks and stuff.
It makes me almost cry that there are any reasons at all for you
not simply making the lot into a relatively simple table and
avoid all the anxieties of performance cross browser.
--
dorayme
John Hosking wrote:
Mike wrote:
>I am having a problem with padding.
Cut down on the beer, then. Har!
> I have three boxes and I want them all to be the same width. In IE it looks like the outside of the DIV stays put and the padding is placed on the inside, so the bottom box lines up with the middle box - which is what I want. In FF it looks like the padding is making the DIV grow to the size of the padding and the boxes then don't line up. If I take the padding out, then the boxes are the same width, but then the text is jammed against the edges.
The link is:
http://www.giftbasketsandtrinkets.com
I believe the problem is with the "content" id, but no amount of tinkering has made it any better.
Well, despite your subject line, it's not a FF padding problem.
First, if you're going to compare IE with FF, get yourself out of quirks
mode (q.G.) and into standards mode. Drop the transitional doctype and
go for 4.01 strict.
And since you're using HTML and not XHTML, clean out the /endings in
your code.
And since you didn't notice the endings, you should probably learn
validate your code and CSS.
And now to the tiny little detail of your problem, which you have all
but solved yourself already:
Change the width you defined for #content to width:680px.
The "why" is the broken box model (q.G.) IE uses in quirks mode.
Remember, too, though, that specifying width for text elements in px
like this is not a great idea. First of all, users of IE (<7) won't be
able to read your text in all cases, because you have hard-coded a small
size. In real browsers, however, changing the font size will break your
design (your three boxes will still -- steadfastly -- remain the same
size, but your menu will overflow the space you've provided. Watch out!
HTH
That's got it fixed. I have some more reading and learning to do!
Thanks to all that helped!! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: delerious |
last post by:
Could someone please take a look at this page:
http://home.comcast.net/~delerious1/index11.html
The set of links on the left should not have any whitespace between them, and
the set of links on the right should have one pixel of whitespace between
them. That's how it looks in IE and Opera. But in Mozilla, a few of the
links on the left have whitespace between them, and some of the links on the
right don't have whitespace between them...
|
by: Knoxy |
last post by:
Hello, I've noticed one or two people post on this before but nobody
seems to have replied so raising the issue again... is this a known
IE6 CSS bug?
I have placed the following in my stylesheet file:
..formContentTable
|
by: Gustaf Liljegren |
last post by:
I continued on the example shown earlier today:
http://gusgus.cn/test/index.html
Now I get some unwanted space in Firefox (the red space just below the
first image) which doesn't appear in IE6. I've double-checked the CSS
for any padding or margings than may cause it, but have found none. How
can I remove it?
Thanks,
|
by: Wilhelm Kutting |
last post by:
hi,
when i use the padding-left attribut, i like to overwrite a default
value like that
..padding30 {margin-left: 30px;}
..padding0 {margin-left: 0px;}
<div class="padding30">
Padding 30
<div id="padding0">
|
by: Remi Villatel |
last post by:
Hi there,
I have following CSS definitions:
div.limits { margin: 0 20px 0 20px; }
div.halfleft {
float: left;
left: 0;
width: 50%;
| |
by: phil-news-nospam |
last post by:
Here is a simpler (no drop shadows) example of the padding bug I see:
http://phil.ipal.org/usenet/ciwas/2006-05-08/buttons-1.html
So far I find nothing in the CSS2 document that says I should get this
kind of inconsistent result.
--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
|
by: Alan Silver |
last post by:
Hello,
In my (seemingly) endless quest to understand CSS, I have yet another
problem. Please look at http://www.kidsinaction.org.uk/ph/x.html in
Opera, where you will see it how I expected. If you look at it in IE (6
or 7), you find it also looks fine, except for the top margin missing
from the links across the top of the page. That's not the main issue
here, but any pointers as to why it doesn't show them would be
appreciated.
|
by: Tom |
last post by:
I am having a problem where an extra gap (whitespace, padding) appears
in a table cell where I don't want it. The data fed in the table is
via dynamic HTML, so the amount in the middle cell may vary. When the
data in the middle table cell is little and that cell's height is
small, an unwanted gap appears in the first table cell. I would prefer
to have all additional blank space at the bottom of the table (last
row) and not have any in...
|
by: xoinki |
last post by:
hi all,
I have a DIV element for which a table is appended..
CSS for this div element is..
.optiondiv
{
display:block;
padding: 0px 30px;
padding-left: 30px;
padding-right: 30px;
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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,...
| |
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...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
| |