473,320 Members | 2,202 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,320 software developers and data experts.

100% Width and Padding

8
Hello,

Site:
http://www.dryleague.com/newDefault.htm
CSS:
http://www.dryleague.com/css/style.css

I'm trying align the date to the bottom-right of my "header" div. The "header" div has a padding of 5px all around. I was able to align the "headerDate" div to the bottom of the container, however, since I couldn't align right, I decided to make it width:100% and text-align:right.

In FF3 & IE7, the "headerDate" div extends past the right edge of it's container by 5px or so. Any ideas why? I figured 100% width would take padding into account. Or perhaps there's an even better method of aligning the date to the right?

IE6 creates a whole different issue where the "logo" div doesn't seem to float properly, pushing the date even farther to the left.

As a side question, does there exist a tool which would allow me to view my page as seen by various browsers (ie. FF3, IE7, IE6, Opera) within one interface?

Thanks,
D.Dubya
Feb 9 '09 #1
5 4176
drhowarddrfine
7,435 Expert 4TB
Because 'page div header' has a padding of 5px.
does there exist a tool which would allow me to view my page as seen by various browsers (ie. FF3, IE7, IE6, Opera) within one interface?
No.
Feb 9 '09 #2
DDubya
8
So if I wanted 'page div.header' to have a padding of 5px, what's the best way to fix it? Why does it account for padding on the left, but not on the right?
Feb 9 '09 #3
drhowarddrfine
7,435 Expert 4TB
I assume you want the padding to keep the logo off the edge. Just add 'left:0' to the headerDate div.

The reason the padding affects only the one side is because block elements are laid out from top to bottom and left to right. Because it's absolutely positioned, the reference becomes the top and left of its parent div.
Feb 9 '09 #4
DDubya
8
You're correct... the padding was solely for the logo. With that in mind, I removed the padding from the 'page div.header' and added it to the logo itself. It looks great now. That said, 'left:0' worked too.

Thanks for all the help. I find it difficult sometimes to visualize what's happening... chalk it up to years of table layouts.
Feb 9 '09 #5
drhowarddrfine
7,435 Expert 4TB
Witch!!! .
Feb 10 '09 #6

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

Similar topics

5
by: Chris Leipold | last post by:
Hi, I have a problem with an element of 100% width and a left paddig. The effect I try to achieve is easy, take a look at: http://swing-tanzen-verboten.de/test.html My Problem is, the width...
17
by: Piers Lawson | last post by:
If the following is displayed in IE6 or FireFox, the text box forces the second DIV to expand beyond its 15em width. Is there a way to have the text box fit within the DIV (preferably without...
6
by: jslaybaugh | last post by:
I'm working on an ASP.NET 2.0 application and am having trouble with a very simple table layout. Using ASP.NET 2.0 it defaults to XHTML 1.0 Transitional and I am trying to comply. However, I...
50
by: Shadow Lynx | last post by:
Consider this simple HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 STRICT//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head>...
17
by: Mike | last post by:
I'm trying to create a page: Three sections (left, topright and bottomright), each with a heading and scrolling (overflow) content. The size of these sections should be based upon the size of the...
4
by: reycri | last post by:
I have a page that works as I intend in IE but not in Firefox: <html> <head> <title>Overflow Test</title> </head> <body style='overflow:hidden; margin:0; padding:0;'> <table border='0'...
1
by: Mike Collins | last post by:
I am trying to create some pages and have them take 100% of the window, but I cannot get 100% to work. If I set the height of my div, the page displays a scroll bar and it looks like I set the...
0
by: sannymak | last post by:
Hello All, I have some problems making the columns 100% and forcing the footer at the bottom. Please refer to the code below and let me know a solution: HTML CODE: <!DOCTYPE html PUBLIC...
4
by: Christopera | last post by:
Hello, I have built a site that uses two divs, one verticle, and one horizontal as graphic style for the ite. The problem I am having is that if the browser is resized very small the divs are...
1
by: adamjblakey | last post by:
Hi, Right i have just built a site which has 3 divs align to the left and in the outer 2 divs i have a background which i want to be a 100% so when the middle stretches so do the outer 2 but it...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.