473,788 Members | 2,837 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CSS3: box-sizing

Hi,

this has certainly been discussed within W3C, but I'd like to give my humble
comment here, too...

Using the current (CSS compliant) width/height handling it is not possible
to easily add full width background to any block element.

Currently, I'm responsible for adding a coloured background around headers
for certain customers. The header background should be coloured and "width:
100%;". Using IE quirks handling, I'd have written something like this:

h1,h2,h3,h4,h5, h6,h7
{
background-color: green;
color: black;

width: 100%;

padding: 1em 3em;
border: 2px solid darkgreen;
margin: 0 0 1em;
}

This works fine, no need to add a div, table or anything around each and
every header element... However, in CSS 2.1 I can't find any setting that
possibly could achieve something like this.

So here's my personal vote to those being responsible to decide about new
CSS specifications: Please positively add the "box-sizing" property to CSS.
It will fill a gap in the current 2.1 specification for sure. [Again, this
is just my humble opinion. Anyone coming up with a pure CSS 2.1 compliant
solution, and I will immediately change my mind ;) ]

Axel Dahmen
Jul 21 '05 #1
2 2144
> However, in CSS 2.1 I can't find any setting that
possibly could achieve something like this.


'width: auto', which is the default value, will do what you want, as
far as I can tell.

-David

--
L. David Baron <URL: http://dbaron.org/ >

Jul 21 '05 #2
Thanks David, for giving me this hint! You are right, according to the specs
your suggestion is going to work, I see it now. I forgot because I
remembered a Netscape version - I believe it was v6 - which rendered a
minimum box around blocks if I didn't explicitly set with to 100%. But, of
course, it wasn't compliant at that time. Yet it stuck to my mind, though.

Thanks for helping me out.

Regards,
Axel


"David Baron" <db****@dbaron. org> schrieb im Newsbeitrag
news:11******** *************@f 14g2000cwb.goog legroups.com...
However, in CSS 2.1 I can't find any setting that
possibly could achieve something like this.


'width: auto', which is the default value, will do what you want, as
far as I can tell.

-David

--
L. David Baron <URL: http://dbaron.org/ >

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3411
by: Jason Bassford | last post by:
Okay, What I'm trying to do is create two boxes, one on top of the other. The first is a static height, the 2nd, underneath it, should take up the remaining amount of screen space and overflow with its own vertical scrollbar for any extra content. I've managed to come up with this, which works perfectly in Mozilla, but fails in IE:
9
2624
by: Stanimir Stamenkov | last post by:
Looking through the draft I still can't figure out how one could (is it possible to) group several elements and style a generated containing block for the group. This is much similar to a typical HTML structure: <H1> <P> <H2> <P> <H3>
14
5782
by: DU | last post by:
According to a recent post, it seems that Konqueror 3.1+ and Safari 1.1 support CSS3 opacity style property under a proprietary name: "Support for the CSS3 opacity (using -khtml-opacity) property. Make entire blocks and inlines transparent without resorting to transparent PNGs." http://weblogs.mozillazine.org/hyatt/archives/2003_10.html#004249 Now, I have a demo page which works for MSIE 6 for Windows and Mozilla-based browsers but...
46
7044
by: DJ WIce | last post by:
Hi all, I did make a script/css thing to replace the contextmenu on the website with a new one: http://www.djwice.com/contextmenu.html It works nice in MSIE, but on Netscape (and probable other browsers) it stays on the same place (does not "open'' where the mouse is). And the links do not work when you click on them. If anyone has sugestions on how to improve it, please let me know.
30
2758
by: Mark Johnson | last post by:
http://www.geo cities.com/seanmhall2003/css3/compat.html Anyone know if Firefox, say, implements just a tad more CSS3 than this? I was thinking of downloading. It's free, unlike Opera. Looks interesting, however.
3
10231
by: Marek Mänd | last post by:
This posting will express my concern about the future of css3 forthcoming recommendation. I think for long time now, that the current implementation of CSS attribute opacity is less than usable in practical real life situations. The soon forthcoming CSS3 recommendation does not serve the public interests in this area not at all. The problem relies in the definition what opacity is, how it is to applied to page elements. In past 5...
2
2196
by: alvarezp | last post by:
I've tried to search the lists for this, and even asked at www-style but I seem not to find anything and they didn't answer. This is about the borders in CSS3. Let's say I'm trying to draw a star-shaped border, a la "Greatest offer!", where the border is visually no more than an broken line. Something like:
4
1774
by: Nik Coughlin | last post by:
Been playing with multiple backgrounds. You'll need Safari (Konquerer works too AFAIK but I haven't tested it) to actually see this: http://nrkn.com/temp/cssTabs/centerFloatlistCss3.html Such a nice, easy way to skin things. Pity it won't work for 95% or more of the browser install base :(
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10366
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5399
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4070
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.