The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Semantic Divs

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #27153

    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.

    But besides that, I normally just add the <div>


    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.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.