Re: [css-d] CSS content attribute.

2012-10-22 Thread Philip TAYLOR



Philippe Wittenbergh wrote:


I am not sure I would consider this a 'bug', rather an experimental
feature. The (now marked as obsolete) css-content module allowed the
 content property ( with value: string) to be applied to any
element (as opposed to only generated content pseudo elements):
http://dev.w3.org/csswg/css3-content/#inserting-and-replacing-content-with-the

(I think it was also allowed in early drafts of CSS 2.0)

I don't think the feature is specified in other modules, although I
could have missed it.

Fwiw, WebKit and Opera allow the content of any element to be
replaced with a uri (e.g. an image).


Thank you for your comments, Philippe, for which I am very grateful.
I am, however, puzzled by your view that it can be considered a feature
(albeit an experimental feature) rather than a bug.

If an implementation chooses to ignore the wording of the current
specification, which according to :

http://www.w3.org/Style/CSS/Overview.en.html

is CSS 2.1 as amended by CSS Color Level 3, CSS Namespaces and
Selectors Level 3, and implements a behaviour that directly
contradicts that specification, how can that be classified as
anything other than a bug ?

In my view (which I do not think is heretical), an author should be
able to /rely/ on a W3C specification, not have to test his/her work
against every extant browser -- would you not agree ?

Philip Taylor
__
css-discuss [css-d@lists.css-discuss.org]
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] CSS content attribute.

2012-10-22 Thread Philippe Wittenbergh

Le 22 oct. 2012 à 18:10, Philip TAYLOR p.tay...@rhul.ac.uk a écrit :

 Thank you for your comments, Philippe, for which I am very grateful.
 I am, however, puzzled by your view that it can be considered a feature
 (albeit an experimental feature) rather than a bug.
 
 If an implementation chooses to ignore the wording of the current
 specification, which according to :
 
   http://www.w3.org/Style/CSS/Overview.en.html
 
 is CSS 2.1 as amended by CSS Color Level 3, CSS Namespaces and
 Selectors Level 3, and implements a behaviour that directly
 contradicts that specification, how can that be classified as
 anything other than a bug ?
 
 In my view (which I do not think is heretical), an author should be
 able to /rely/ on a W3C specification, not have to test his/her work
 against every extant browser -- would you not agree ?

1. CSS 2.1 is a REC (a recommendation), it is not a law punishable with the 
death penalty (we wouldn't have much browser in that case)
2. For ages, work has been going on to extend CSS 2.1; the noted CSS-content 
module is one such example. Browser implentators can start implementing that 
work on an experimental basis and test it. Ideally, that would happen behind a 
vendor-prefix flag; obviously, that didn't happen that much at the time that 
CSS content module was first produced (10 years ago); there are (quite a few) 
other properties and values that are implemented in one or more rendering 
engines that way. Some would argue that such experimental feature shouldn't 
ship with release version of browsers. I think that would be sad; many of the 
features that are commonly used in designing pages nowadays wouldn't be as 
solid as they are today without those experimental features being included in 
release version of browsers.

So no, not a bug, but an experimental feature; an unfortunate one maybe, at 
least for you apparently, and I don’t see much use for that feature, 
personally, but nothing more. It is extending the boundaries of the possible. 
And some of those experiments stick, some fail. Some get improved, some turn 
out to be useless.

A bug is something more irrational, like, for example, Opera running on OS X 
making crapshoot of an element with { font-weight:  bold; font-style: italic; } 
- they are slanting the font,  substituting glyphs even though the specific 
font-family has all required faces. Creepily ugly doesn’t start describing it. 
Or Gecko being unable to draw a nice dotted border in combination with the 
border-radius property (an other real old bug). Real ugly results again.

Sometimes I wish I could ‘rely’ on the REC status of CSS 2.1 or other modules 
and save on cross browsers testing time. That always turn out to be wishful 
thinking. Without fail.  IOW, a pipe dream.

PS - If one makes an error in a stylesheet (did you wrote E { content: 'foo'; } 
instead of E::after {} ?) then sometimes strange things happen…

PPS - E { content: 'foo'; } actually validates.

Philippe
--
Philippe Wittenbergh
http://l-c-n.com




__
css-discuss [css-d@lists.css-discuss.org]
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] CSS content attribute.

2012-10-22 Thread Philip TAYLOR

Thank you for your further comments, Philippe : as we are
moving on to philosophy rather than CSS per se, I will
not continue the debate here.  However, to address your
closing query :



PS - If one makes an error in a stylesheet (did you wrote E {
content: 'foo'; } instead of E::after {} ?) then sometimes strange
things happen…

PPS - E { content: 'foo'; } actually validates.


No, I am actually using (and relying on)

E style=content: 'foo'

the actual code reads :

SPAN class=Apparatus referentium style=content: 'Set: 1; parts: 2'

I use it because (a) it is permitted (i.e., it is in accordance with
the specification and therefore validates, yet has no effect on the
rendered output in any conforming browser), and (b) because it is
a reliable way of passing information into the DOM which I can later
retrieve in order to affect the processing of the data.  In this
particular case I tag two (or more) disjoint spans with the same
style/content information to allow client-side scripting to ascertain
that they are to be treated identically in terms of visual rendition
(in this case, dynamic underlining which takes place when the SPAN
is clicked on in order to trigger a dynamic footnote to appear or
disappear.

I have coerced Opera into behaving acceptably by adding an !important
style rule in the HEAD region.

Philip Taylor
__
css-discuss [css-d@lists.css-discuss.org]
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] CSS content attribute.

2012-10-22 Thread Jukka K. Korpela

2012-10-22 19:50, Philip TAYLOR wrote:


 SPAN class=Apparatus referentium style=content: 'Set: 1; parts:
2'

I use it because (a) it is permitted (i.e., it is in accordance with
the specification and therefore validates, yet has no effect on the
rendered output in any conforming browser),


In any browser that conforms to the CSS 2.1 specification, yes. But 
browsers are increasingly deviating from CSS 2.1 here, allowing at least 
a url(...) value. I think it is an unnecessary risk to rely on a CSS 2.1 
principle that was really meant to say just that in CSS 2.1, the 
'content' property applies to ':before' and ':after' pseudoelements only.



and (b) because it is
a reliable way of passing information into the DOM which I can later
retrieve in order to affect the processing of the data.


You are effectively using the 'style' attribute as a carrier for 
application-specific data, not for making presentational suggestions. So 
I would classify this as a hack and kludge. There is a better option, 
especially designed for such purposes: data-* attributes; though 
formally still just part of the HTML5 draft, they can be freely used, as 
they require no special support in browsers.



In this
particular case I tag two (or more) disjoint spans with the same
style/content information to allow client-side scripting


Without knowing exactly how the data is to be used, I'd say that this 
might be handled using a 'class' attribute, too.



I have coerced Opera into behaving acceptably by adding an !important
style rule in the HEAD region.


Whenever !important seems to be the solution, it's time to reconsider 
the problem.


Yucca


__
css-discuss [css-d@lists.css-discuss.org]
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] CSS content attribute.

2012-10-22 Thread Jukka K. Korpela

2012-10-22 20:31, Philip TAYLOR wrote:

 You are effectively using the 'style' attribute as a carrier for
 application-specific data, not for making presentational suggestions.
[...]
 But no better option appeared to present
 itself; title was an option, but there was a distinct risk that
 a browser would present the contents thereof as a tooltip, and no
 way of overriding that behaviour in CSS of which I was aware.

That is correct. The 'title' attribute has sometimes been used for such 
purposes, but it has obvious drawbacks, and CSS indeed has no tools for 
switching off or tuning the tooltip behavior.


 There is a better option,
 especially designed for such purposes: data-* attributes; though
 formally still just part of the HTML5 draft, they can be freely used, as
 they require no special support in browsers.

 If they were in the HTML 4.01 specification (even the transitional
 version), I would use them without compunction.

I see your point, but on the practical side, HTML 4.01 is partly 
outdated, and using some HTML5 features - which are in this case just 
canonicalization of what actually works in browsers - looks more robust 
to me than using 'style' for purposes like this.


 Unfortunately the contraints placed on syntactically valid values
 for the class attribute would prevent me from presenting the
 data in a semantically transparent manner : I /want/ to express
 the concept 'Set: 1; parts: 2'

I don't think the constraints prevent that; class=Set: 1; parts: 2 is 
valid HTML 4.01, though it somewhat unintuitively specifies four 
separate classes. Using such class names in CSS would be problematic 
(not impossible - you just need to use some escapes), but in scripting, 
you won't have those problems.


Yucca
__
css-discuss [css-d@lists.css-discuss.org]
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] CSS content attribute.

2012-10-22 Thread Philip TAYLOR



Jukka K. Korpela wrote:


I don't think the constraints prevent that; class=Set: 1; parts: 2 is
valid HTML 4.01,


Well I'm d@mned : so it does.  Thank you for drawing that to my
attention.  What is somewhat odd is that when I use the validator
to confirm that it is indeed valid, and then use the CSS link-
through to validate the CSS, it (a) validates against the CSS 3
specification (why ?), and (b) validates only the stylesheet
that appears in the HEAD region and overlooks completely
the inline styles on which I really want it to comment :


http://validator.w3.org/check?uri=http://web-consultants.org.uk/tests/css-content.html

Philip Taylor
__
css-discuss [css-d@lists.css-discuss.org]
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] CSS content attribute.

2012-10-22 Thread Jukka K. Korpela

2012-10-22 20:58, Philip TAYLOR wrote:


What is somewhat odd is that when I use the validator
to confirm that it is indeed valid, and then use the CSS link-
through to validate the CSS, it (a) validates against the CSS 3
specification (why ?),


They decided the default to CSS3 a while ago. Some tools (like the CSS 
validation command in Firefox Web Developer Extension) still call the 
validator with the level set to CSS 2.1, but using the W3C CSS Validator 
directly, CSS3 is the default. Before they did this, they got many 
complaints from people who used CSS3 features.


There is no rigorous definition for CSS3 is this context; effectively 
it means CSS 2.1 + the CSS3 specs that have reached at least CR status + 
some other CSS3 specs (drafts), depending on the judgment of people 
who maintain the software.



and (b) validates only the stylesheet
that appears in the HEAD region and overlooks completely
the inline styles on which I really want it to comment :


This looks like a mystery to me, but it seems that it's just a mystery 
in reporting Valid CSS. Testing with an HTML 4.01 document with h1 
style=color: redHello world/h1 and no other style sheets, I get a 
response about Valid CSS but with the message No style sheet found. I 
think it still reads the style attributes and checks them, since if I 
use color: funnycolor instead, an error is reported.


Yucca



__
css-discuss [css-d@lists.css-discuss.org]
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] CSS content attribute.

2012-10-21 Thread Philip TAYLOR

According to :

http://www.w3.org/TR/CSS21/generate.html#content

the computed value of the content attribute for an element
(/qua/ element) is normal; Seamonkey and Internet Explorer
both respect this, and render :

SPAN style=content: 'bar'foo/SPAN

as :

foo

It has been reported, however, that Opera does not respect
the specification, and renders it as :

bar

If this is the cas, would the general consensus be that this
represents a bug in the Opera rendering engine and would therefore
warrant a bug report ?

Philip Taylor

__
css-discuss [css-d@lists.css-discuss.org]
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] CSS content attribute.

2012-10-21 Thread Barney Carroll
For what it's worth, I noticed this behaviour in Opera at least 2 years
ago. It strikes me as definitely wrong, and a bug according to the spec
(depends on how much implication you want to read into it — Opera have
arguably excelled in pursuing an aggressively imaginative approach to
implementing vague spec, and arguably standards have profited from it, in
that weak points come to the fore).

I'd say go for it — and a link back would be good so we can put our efforts
towards corroboration.

By the by, in terms of zealous generated content as a philosophy, the
type=date inputs are another great example of Opera bringing huge
unasked-for gifts to the table.


-- 
Regards,
Barney Carroll

barney.carr...@gmail.com
+44 7429 177278

barneycarroll.com
__
css-discuss [css-d@lists.css-discuss.org]
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] CSS content attribute.

2012-10-21 Thread Philippe Wittenbergh

Le 22 oct. 2012 à 08:25, Philip TAYLOR p.tay...@rhul.ac.uk a écrit :

 According to :
 
   http://www.w3.org/TR/CSS21/generate.html#content
 
 the computed value of the content attribute for an element
 (/qua/ element) is normal; Seamonkey and Internet Explorer
 both respect this, and render :
 
   SPAN style=content: 'bar'foo/SPAN
 
 as :
 
   foo
 
 It has been reported, however, that Opera does not respect
 the specification, and renders it as :
 
   bar
 
 If this is the cas, would the general consensus be that this
 represents a bug in the Opera rendering engine and would therefore
 warrant a bug report ?

I am not sure I would consider this a 'bug', rather an experimental feature.
The (now marked as obsolete) css-content module allowed the content property ( 
with value: string) to be applied to any element (as opposed to only 
generated content pseudo elements):
http://dev.w3.org/csswg/css3-content/#inserting-and-replacing-content-with-the

( I think it was also allowed in early drafts of CSS 2.0)

I don't think the feature is specified in other modules, although I could have 
missed it.

Fwiw, WebKit and Opera allow the content of any element to be replaced with a 
uri (e.g. an image).


Barney Carroll barney.carr...@gmail.com a écrit 

 By the by, in terms of zealous generated content as a philosophy, the
 type=date inputs are another great example of Opera bringing huge
 unasked-for gifts to the table.

Uh? that is part of HTML5 (and actively under development for Gecko and WebKit):

http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#date-state-(type=date)

Philippe
--
Philippe Wittenbergh
http://l-c-n.com




__
css-discuss [css-d@lists.css-discuss.org]
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] CSS content attribute.

2012-10-21 Thread Barney Carroll
  By the by, in terms of zealous generated content as a philosophy, the
  type=date inputs are another great example of Opera bringing huge
  unasked-for gifts to the table.

 Uh? that is part of HTML5 (and actively under development for Gecko and
 WebKit):


 http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#date-state-(type=date)


I'm not contesting whether or not the date type is part of the
specification: but the creation of unconfigurable jQuery-UI-style calendar
GUIs is an interesting pro-active approach to the perceived problem not
mentioned in the afore-linked specification.


-- 
Regards,
Barney Carroll

barney.carr...@gmail.com
+44 7429 177278

barneycarroll.com
__
css-discuss [css-d@lists.css-discuss.org]
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] CSS Content

2011-09-22 Thread Giles, Sarah
I want to add an img before a div tag using CSS content. Is this possible?


Before I get my rear jumped about adding content with CSS and the whole 
separation of presentation and content thing I will state this img IS 
presentation.
Basically I have a grouping of div (section might be a more applicable tag 
and I might think about switching them but they are edited by a person whom 
isn't all that up to date with latest html and css)
Some of these groups are Special And their specialness changes on a personal 
whim. So I am creating a class to denote their specialness that will change 
their background color, give a boarder, and change font color. I also want to 
add a darling little img of a red ribbon to the corner of each because you know 
nothing says I'm special like being decked out in ribbons and bows.
Now I just need to figure out how to add some kittens, unicorns and rainbows.
hummm maybe I should use the :after selector to add an img of a kitten riding a 
unicorn under a rainbow
….AND put the whole thing in a blink tag

Seriously though I want to keep the red ribbon out of my markup.

-Sarah


__
css-discuss [css-d@lists.css-discuss.org]
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] CSS Content

2011-09-22 Thread Tim Arnold
On Thu, Sep 22, 2011 at 10:38 AM, Giles, Sarah
sarah.gi...@cookmedical.com wrote:

 Some of these groups are Special And their specialness changes on a 
 personal whim. So I am creating a class to denote their specialness that will 
 change their background color, give a boarder, and change font color. I also 
 want to add a darling little img of a red ribbon to the corner of each 
 because you know nothing says I'm special like being decked out in ribbons 
 and bows.

 -Sarah

You could use the :after pseudoclass, but it might be simpler
(certainly better supported in all browsers) to place it as a
background image to the div in question.  Position it top left and add
enough left padding to the div to make room for it.  Something like:

.specialHolder {padding-right: 20px; background: #f00
url(redribbon.png) top right no-repeat;}

-- 

tim.arn...@gmail.com
__
css-discuss [css-d@lists.css-discuss.org]
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] CSS Content

2011-09-22 Thread Giles, Sarah


On 9/22/11 10:53 AM, Tim Arnold tim.arn...@gmail.com wrote:

You could use the :after pseudoclass, but it might be simpler
(certainly better supported in all browsers) to place it as a
background image to the div in question.  Position it top left and add
enough left padding to the div to make room for it.  Something like:


The problem is the img needs to be on top of and overlapping the div
container. 
I'm thinking of adding it to the background of the including h tag then
offsetting that htag with - margin. And giving it lots of padding



__
css-discuss [css-d@lists.css-discuss.org]
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] CSS Content

2011-09-22 Thread Tedd Sperling
On Sep 22, 2011, at 10:38 AM, Giles, Sarah wrote:

 I want to add an img before a div tag using CSS content. Is this possible?
 
 Before I get my rear jumped about adding content with CSS and the whole 
 separation of presentation and content thing I will state this img IS 
 presentation.
 Basically I have a grouping of div (section might be a more applicable 
 tag and I might think about switching them but they are edited by a person 
 whom isn't all that up to date with latest html and css)
 Some of these groups are Special And their specialness changes on a 
 personal whim. So I am creating a class to denote their specialness that will 
 change their background color, give a boarder, and change font color. I also 
 want to add a darling little img of a red ribbon to the corner of each 
 because you know nothing says I'm special like being decked out in ribbons 
 and bows.
 Now I just need to figure out how to add some kittens, unicorns and rainbows.
 hummm maybe I should use the :after selector to add an img of a kitten riding 
 a unicorn under a rainbow
 ….AND put the whole thing in a blink tag
 
 Seriously though I want to keep the red ribbon out of my markup.
 
 -Sarah

-Sarah:

I'm not sure as to what you want -- but markup is html and html is the language 
holds the entire web page together -- it's the glue. Images are just another 
item you can place within your markup and thus cannot be kept out of markup -- 
unless you do not use markup at all and just provide a url to an image. But I 
don't think that is what you want.

I won't address the concept of separation of content from presentation but 
basically it involves of first determining what is content and then second what 
is available to you do to change it's presentation. To me, if the presentation 
of an item can be changed, then the item is probably content. As such, CSS 
cannot add content, but rather simply change the way content can look.

Now, to answer your question of is it possible to add an image before a div 
tag? Most certainly -- I am sure you have seen image backgrounds, right? So, 
you can add images via css to appear anywhere you want.

One can argue that if css can provide an image, then it is providing content, 
but that's a weak argument.

So, what is it you really want to do? Providing urls of your attempts would 
help.

Cheers,

tedd


t...@sperling.com
http://sperling.com





__
css-discuss [css-d@lists.css-discuss.org]
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] CSS Content

2011-09-22 Thread G.Sørtun

On 22.09.2011 16:38, Giles, Sarah wrote:

I want to add an img before adiv  tag using CSS content. Is this possible?


Yes, no problem.

Example-page: http://www.gunlaug.com/index.html

...where I use the following site-wide styles to insert 3 birds, an (R) 
and a (C) in the header-area, and a cat at the cross-point between right 
column and footer. All images absolute positioned  relative to their 
containers, and all discretely injected as page-decoration :-)


#nav:before {content: url(../imagedepot/burp-1.png);
position: absolute; top: -60px; right: 13%;
width: 150px;}

#base:after {content: url(../imagedepot/op-peregrine.png);
position: absolute; top: 54px; right: 8px;}

#sec:before {content: url(../imagedepot/op-peregrine-1.png);
position: absolute; top: -60px; left: -10%;}

#base:before {content: url(../imagedepot/op-kestrel-1.png);
position: absolute; top: -3px; right: 12%;}

#main:before {content: url(../imagedepot/cr20.png);
position: absolute; top: 103px; right: 3px;}

#main:after {content: url(../imagedepot/rg20.png);
position: absolute; top: 3px; left:330px;}


I have used the old form with : (not ::) to make it work in as old 
browsers as possible, and even older browsers that don't support either 
form just don't present the decoration.



regards
Georg
__
css-discuss [css-d@lists.css-discuss.org]
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] CSS Content

2011-09-22 Thread Giles, Sarah

On 9/22/11 4:01 PM, G.Sørtun gunla...@c2i.net wrote:

On 22.09.2011 16:38, Giles, Sarah wrote:
 I want to add an img before adiv  tag using CSS content. Is this
possible?

Yes, no problem.

Example-page: http://www.gunlaug.com/index.html

...where I use the following site-wide styles to insert 3 birds, an (R)
and a (C) in the header-area, and a cat at the cross-point between right
column and footer. All images absolute positioned  relative to their
containers, and all discretely injected as page-decoration :-)


This is what I went with:
style
body{
background-color:#c1a574;
}
.wrapper{
width:600px;
margin:50px auto;
}
.featured_offer:before{
content:url(http://myimage.png);
left: -60px;
position: relative;
top: -20px;
}
.featured_offer{
border:1px solid #44220e;
margin:10px 0px;
background-color:#e8deb6;
padding:0 20px 20px 40px;
color: #44220e;
}
.featured_offer h1{
margin:-15px 0px 8px -20px ;
padding:0px;
font-family: Palatino Linotype,Book Antiqua,Palatino,serif;
font-size: 1.9em;
}

/style
/head
body
div class=wrapper
section class=featured_offer
h1blah balh balh/h1
p
Some stuff about blah blah blah. p
h2blah balh balh:/h2
ul
liblup/li
liblup/li
liblup/li
liblup/li

/ul
/section
/div
/body



I haven't tested it yet in all browsers how it will work.

__
css-discuss [css-d@lists.css-discuss.org]
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] CSS Content

2011-09-22 Thread G.Sørtun

On 22.09.2011 22:01, G.Sørtun wrote:

Example-page: http://www.gunlaug.com/index.html


Note that I have wrapped the before: and after: styles in a ...

@media screen {}

...where I initially set all before: and after: to display: none 
to hide these styles from a few semi-old browsers that support before: 
and after: but don't position CSS content properly.


I then re-set these particular styles to display: block in a...

@media screen and (min-width: 0) {}

...since I have found through testing that browsers that support that 
particular mediaquery also do an acceptable job on positioning CSS content.


It is all in the CSS support and sequence, and mine is just one way to 
achieve the intended hide and seek for generated content across 
browsers and browser-versions.


regards
Georg
__
css-discuss [css-d@lists.css-discuss.org]
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] CSS Content

2011-09-22 Thread G.Sørtun

On 22.09.2011 22:14, Giles, Sarah wrote:

This is what I went with: [.]


Should work OK, although I would normally define position: absolute on 
the generated content and position: relative on the .featured_offer 
container or one of its parents. Find positioning to be more flexible 
that way, but such flexibility is of course not always needed.


regards
Georg

__
css-discuss [css-d@lists.css-discuss.org]
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] CSS content scroller

2010-03-12 Thread Neil Hunt
Anyone have any good example of a scroller (some call conveyor) using just
CSS...similiar to what it being used on front page of USA Today for Top
Picks?  Looking for good sample or how-to instructions.
__
css-discuss [cs...@lists.css-discuss.org]
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/