[css-d] weird safari width issue

2008-02-04 Thread Josh Ghiloni
ok, i suppose "weird" isn't really apropos there.

I have a 2-div layout. The left div's width is set to 180px and is a
sidebar. The right div has no width or position set, and it just floats to
the right of the div, and takes the remainder of its container's space up.
Its overflow property is set to hidden.

Inside the right div is a table that is longer than the div itself. I have
the overflow property set to auto, and in IE and firefox the scroll bars
show up going only to the edge of the container, much like i'd expect.
However, on Safari, the table believes that its containing div is really
100% wide and attempts to fill it up. Has anyone seen anything like that in
Safari, and more importantly, do you know of a fix?

Here are some screenshots of the issue at hand.

http://i63.photobucket.com/albums/h128/fobaysnrl2/ffoverflow.png
http://i63.photobucket.com/albums/h128/fobaysnrl2/ieoverflow.png
http://i63.photobucket.com/albums/h128/fobaysnrl2/safoverflow.png

Thanks!
Josh
-- 
Internets. Serious business.
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] question about style inheritance

2008-01-11 Thread Josh Ghiloni
Thank you for your response, Jukka (you too Highpowered!) Both of them
were very helpful. Given that I'm required to support IE 6 (shudder)
among other browsers, it seems the attribute selector method is not
the way to go (I need to remember to test on IE 6 more often -- time
to change some of my existing code!). I suppose I could load an
alternate RTL stylesheet in the situations where I'm supporting RTL
languages.

Thanks again!

On Jan 11, 2008 6:03 PM, Jukka K. Korpela <[EMAIL PROTECTED]> wrote:
> Josh Ghiloni wrote:
>
> > I have a bit of code that, for example, looks like this:
> >
> > 
> > div { color: blue }
> > div[dir="rtl"] { color: red }
> > 
>
> First of all, I'd like to say that most "questions about style
> inheritance" aren't. In you example, there is no way in which any div
> element could inherit a value for the color property. The first rule
> makes sure that when this style sheet is used, every div element has the
> color property directly assigned to it, and this means that inheritance
> is _out_ for it. (_Other_ elements inside a div element may inherit the
> color property from it.)
>
> Second, I hope that you know that IE 6 does not support attribute
> selectors, and it's probably still the most widely used browser. It
> would ignore your second rule and apply the first one. The same applies
> even to IE 7 in "Quirks Mode".
>
> > 
> > hi!
> > bye!
> > 
> >
> > As I somewhat expected, the outer (hi!) text rendered red, whereas the
> > inner child is rendering blue.
>
> On supporting browsers, yes.
>
> > Is there a way I can define my styles
> > such that div[dir="rtl"] and any children (at any level and whose dir
> > is not explicitly "ltr") all match the same style?
>
> Do you mean any children by "any children"? Then you can write
>
> div[dir="rtl"], div[dir="rtl"] * { color: red }
>
> Or if you mean just div children of a div element that has dir="rtl",
> you'd write
>
> div[dir="rtl"], div[dir="rtl"] div { color: red }
>
> However, these imply that if you have
>
> 
>
>   ...
>
> 
>
> then the rule would still apply to the inner div, i.e. the dir="rtl"
> would not prevent the selector from applying to it.
>
> > Alternatively, is
> > it bad form to not explicitly set the dir attribute on the divs inside
> > a div whose dir attribute is "rtl"?
>
> I don't quite follow... how would that be bad form? The dir attribute is
> by default inherited in the HTML sense, and has dir="ltr" as the
> default, and it is common practice to omit it altogether unless you have
> some right to left text, in which case one normally sets dir="rtl" for
> the outermost element.
>
> Jukka K. Korpela ("Yucca")
> http://www.cs.tut.fi/~jkorpela/
>
> __
> css-discuss [EMAIL PROTECTED]
> http://www.css-discuss.org/mailman/listinfo/css-d
> List wiki/FAQ -- http://css-discuss.incutio.com/
> List policies -- http://css-discuss.org/policies.html
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
>



-- 
Internets. Serious business.
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


[css-d] question about style inheritance

2008-01-11 Thread Josh Ghiloni
Hi All.

I have a bit of code that, for example, looks like this:


div { color: blue }
div[dir="rtl"] { color: red }



hi!
bye!


As I somewhat expected, the outer (hi!) text rendered red, whereas the
inner child is rendering blue. Is there a way I can define my styles
such that div[dir="rtl"] and any children (at any level and whose dir
is not explicitly "ltr") all match the same style? Alternatively, is
it bad form to not explicitly set the dir attribute on the divs inside
a div whose dir attribute is "rtl"?

Thanks a lot!

-- 
Internets. Serious business.
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/