| Author |
width:100% + padding
|
|
| Chris Leipold 2004-11-18, 7:17 pm |
| 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 of the element h1 is 100%+20px and causes
therefore an horizontal scrollbar. Looks not nice.
Any ideas how to get the element to a width of 100% with a padding?
Thanks
Chris
| |
| henman 2004-11-18, 7:17 pm |
| Steve Pugh <steve@pugh.net> wrote in message news:<6qq9p0liai1a8h73hs8blrfbcgpomo5tbl@4ax.com>...
> On Fri, 12 Nov 2004 16:35:02 +0000 (UTC), 2metre
> <2metre@xxxhersham.net> wrote:
>
>
>
> Yes it is.
> 100% + 20px is greater than 100% therefore scrolling is produced.
>
>
> That moves the blue all the way to the left, but (except in IE5 with
> its broken box model) still produces horizontal scroling.
>
> Steve
create a table with 100% as width and add the h1 inside it
e.g:
<table style="background-color: blue;" width="100%">
<tr><td>
<h1 style="margin: 0px; padding-left: 20px; color: white;">Foobar</h1>
</td></tr></table>
henman
| |
| Steve Pugh 2004-11-21, 7:16 pm |
| On 15 Nov 2004 00:47:22 -0800, saisan@XXXXXXXXXX (henman) wrote:
>create a table with 100% as width and add the h1 inside it
Why? Is it tabular data?
Steve
| |
| henman 2004-11-21, 11:18 pm |
| Steve Pugh <steve@pugh.net> wrote in message news:<6qq9p0liai1a8h73hs8blrfbcgpomo5tbl@4ax.com>...
> On Fri, 12 Nov 2004 16:35:02 +0000 (UTC), 2metre
> <2metre@xxxhersham.net> wrote:
>
>
>
> Yes it is.
> 100% + 20px is greater than 100% therefore scrolling is produced.
>
>
> That moves the blue all the way to the left, but (except in IE5 with
> its broken box model) still produces horizontal scroling.
>
> Steve
create a table with 100% as width and add the h1 inside it
e.g:
<table style="background-color: blue;" width="100%">
<tr><td>
<h1 style="margin: 0px; padding-left: 20px; color: white;">Foobar</h1>
</td></tr></table>
henman
|
|
|
|
| Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |