June 04, 2006 style sheets | ||||
---|---|---|---|---|
| ||||
I took out the: height=0; lines in www.digitalmars.com/d/style.css, so it works in mozilla, but now it doesn't look right in Explorer (excessive vertical spacing). Also, the tabs on the upper right are one pixel too low in mozilla. Anyone know how to write a style sheet that will work in both? |
June 04, 2006 Re: style sheets | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> I took out the:
>
> height=0;
>
> lines in www.digitalmars.com/d/style.css, so it works in mozilla, but now it doesn't look right in Explorer (excessive vertical spacing).
> Also, the tabs on the upper right are one pixel too low in mozilla.
>
> Anyone know how to write a style sheet that will work in both?
still broken in safari
|
June 04, 2006 Re: style sheets | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | In article <e5vgbg$2efc$1@digitaldaemon.com>, Walter Bright says... > >I took out the: > > height=0; > >lines in www.digitalmars.com/d/style.css, so it works in mozilla, but now it doesn't look right in Explorer (excessive vertical spacing). Also, the tabs on the upper right are one pixel too low in mozilla. > >Anyone know how to write a style sheet that will work in both? Rather convinently, IE will still process any rule that begins with '//'. As all browsers will follow the last declared instance of a rule, you can exploit both behaviors like so: foobar{ height: 1px; //height: 0px; } .. where Mozilla will obey the comment and use 1px, and IE will follow both and use 0px due to the ordering. While I don't advocate using stylesheet hacks like that, sometimes, its the fastest workaround available. - EricAnderton at yahoo |
June 04, 2006 Re: style sheets | ||||
---|---|---|---|---|
| ||||
Posted in reply to pragma | pragma wrote:
> Rather convinently, IE will still process any rule that begins with '//'. As
> all browsers will follow the last declared instance of a rule, you can exploit
> both behaviors like so:
>
> foobar{
> height: 1px;
> //height: 0px;
> }
>
> .. where Mozilla will obey the comment and use 1px, and IE will follow both and
> use 0px due to the ordering.
Ok, that does seem to work.
But in Mozilla, there is still excessive spacing above the "Community" and "Archives" thing, that isn't in Explorer.
|
June 04, 2006 Re: style sheets | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johan Granberg | Johan Granberg wrote:
> Walter Bright wrote:
>> Anyone know how to write a style sheet that will work in both?
> still broken in safari
Can you suggest a fix? I don't have safari.
|
June 04, 2006 Re: style sheets | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote: > I took out the: > > height=0; > > lines in www.digitalmars.com/d/style.css, so it works in mozilla, but now it doesn't look right in Explorer (excessive vertical spacing). > Also, the tabs on the upper right are one pixel too low in mozilla. > > Anyone know how to write a style sheet that will work in both? It's broken in IE7 http://img390.imageshack.us/img390/8088/dmdsite8wq.png |
June 04, 2006 Re: style sheets | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> Johan Granberg wrote:
>> Walter Bright wrote:
>>> Anyone know how to write a style sheet that will work in both?
>> still broken in safari
>
> Can you suggest a fix? I don't have safari.
adding a float:right; like this seemed to help
div#content
{
margin-left:13em;
/*border-left: 1px solid black;*/
padding-top: 1em;
padding-left: 0em;
float:right;
}
|
June 04, 2006 Re: style sheets | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johan Granberg | Johan Granberg wrote:
> Walter Bright wrote:
>> Johan Granberg wrote:
>>> Walter Bright wrote:
>>>> Anyone know how to write a style sheet that will work in both?
>>> still broken in safari
>>
>> Can you suggest a fix? I don't have safari.
> adding a float:right; like this seemed to help
>
> div#content
>
> {
>
> margin-left:13em;
>
> /*border-left: 1px solid black;*/
>
> padding-top: 1em;
>
> padding-left: 0em;
> float:right;
>
> }
forget what i said it was a bad browser cache
|
June 04, 2006 Re: style sheets | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote: > I took out the: > > height=0; > > lines in www.digitalmars.com/d/style.css, so it works in mozilla, but now it doesn't look right in Explorer (excessive vertical spacing). Also, the tabs on the upper right are one pixel too low in mozilla. > > Anyone know how to write a style sheet that will work in both? div#navigation ul { list-style-type: none; margin-top: 0px; margin-left: 1ex; margin-right: 1ex; margin-bottom: 1ex; padding: 0; } div#navigation li { padding-left: 0; padding-bottom: 3px; } div#navigation a { text-decoration: none; padding: 3px; background-color: #eeeeee; color: black; } div#navigation a:hover { background-color: #dddddd; } |
June 04, 2006 Re: style sheets | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Anderson | Brad Anderson wrote: > Walter Bright wrote: >> I took out the: >> >> height=0; >> >> lines in www.digitalmars.com/d/style.css, so it works in mozilla, but now it doesn't look right in Explorer (excessive vertical spacing). Also, the tabs on the upper right are one pixel too low in mozilla. >> >> Anyone know how to write a style sheet that will work in both? > > div#navigation ul > { > list-style-type: none; > margin-top: 0px; although I think it looks better with the above line being 1ex, like the rest. so, you could do margin: 1ex; and be done with it. > margin-left: 1ex; > margin-right: 1ex; > margin-bottom: 1ex; > padding: 0; > } > div#navigation li > { > padding-left: 0; > padding-bottom: 3px; > } > div#navigation a > { > text-decoration: none; > padding: 3px; > background-color: #eeeeee; > color: black; > } > div#navigation a:hover > { > background-color: #dddddd; > } > |
Copyright © 1999-2021 by the D Language Foundation