At 10:10 AM 7/23/2006, Gunlaug Sørtun wrote:
Is there a standard-compliant and 'semantically clean' way to generate
the extra elements/style-hooks needed for something like what's in this
test-page...
<http://www.gunlaug.no/homesite/main_6_xv.html>
...that'll work in most browsers?

Georg,

Your basic structure looks like it would be easy to implement in JavaScript or PHP. Using PHP, the expanded markup would be downloaded to the browser so it would render immediately and wouldn't be dependent on JavaScript. Using either language you'd be able to mark up your pages without hard-coding the extra divs.

<div class="rob1">

        <div class="t0"><!-- --></div>
        <div class="t1"><!-- --></div>
        <div class="t2"><!-- --></div>
        <div class="t3"><!-- --></div>
        <div class="t4"><!-- --></div>
        <div class="t5"><!-- --></div>
        <div class="t6"><!-- --></div>

        <div class="brdr-field bgnd1">
                <div class="hdl-field">
                        <h4 class="area-br-left19">Easy borders</h4>
                </div>
        </div>

        <div class="b6"><!-- --></div>
        <div class="b5"><!-- --></div>
        <div class="b4"><!-- --></div>
        <div class="b3"><!-- --></div>
        <div class="b2"><!-- --></div>
        <div class="b1"><!-- --></div>
</div>

It looks like your seed markup might be this:

<div class="rob1 rc">
        <div class="brdr-field bgnd1">
                <div class="hdl-field">
                        <h4 class="area-br-left19">Easy borders</h4>
                </div>
        </div>
</div>

If every element that needs the t#s and b#s inserted has a common flag, say an additional class name (such as "rc" above), JavaScript could walk the DOM and insert the extra divs where needed.

Are "brdr-field bgnd1" and "hdl-field" part of the original page markup, or can they be generated too?

This is the technique I'm using on my site: http://juniperwebcraft.com/ Compare the page source with the generated source to see the difference.

More difficult still: how to integrate it all with a real
background-image on the box.

Tell me how you envision the background image looking. Would the background image itself appear to have rounded corners as well?

Regards,
Paul


******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************

Reply via email to