I would like to include some decorative borders on certain elements of my page, but it requires me to create DIVs and insert background images. Is there a more semantic way to do this?
By "More Semantic", it sounds like you mean "less html markup" ?
You don’t have to apply CSS to only <Div>s, if there is already an element there that could have the background image, you can do that. Heck, you can apply the BG image to the <body> and try to position it at the correct spot.
There is no semantic way to add meaningless content. You can check to see if you’re utilising all existing block-level elements for you background images. If you do need more, then add more, but don’t go overboard. It’s never ideal to add extra divs, but some complex layouts do occasionally call for it, so it isn’t completely frowned on.
Author
Posts
Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘CSS’ is closed to new topics and replies.