home about/faq features tutorials resources members search

Wise Women List Archive File

CSS and Line Breaks


Hi my wiser colleagues - Does anyone know -- is there a way to specify a linebreak using CSS and not a <br>?

In all of the web sites that use CSS for positioning, rather than tables, and have a sidebar, you find the sidebar at the bottom (hopefully) all stacked up as if it were still a sidebar.

My goal is to have, in CSS enabled browsers, a non-tabled sidebar, and in earlier browsers, a line of links. I don't care how it aligns, I just don't want a vertical line of lines. Is there a hack? Can anyone help?

I am not sure what your asking in the last two paragraphs. To have a BR in CSS is to use a < .div> which is a block level element and <.span> is an inline element. Don't mean to confuse you, but block level defines divisions like multiple Paragraphs. Span is simple it allows you to change a word or something in a sentence without a br. Could this be what you're looking for?

<style type="text/css">
.menu span {display: block;}


<div class="menu">
    <span><a href="menu1.html">Menu1</a></span>
    <span><a href="menu2.html">Menu2</a></span>
    <span><a href="menu3.html">Menu3</a></span>
    <span><a href="menu4.html">Menu4</a></span>

Thank you! [someone], that was totally the answer, thank you so much! And [someone else], sorry I wasn't more clear -- this wasn't a question about blocklevel elements. I've posted a mockup of this tableless layout at
http://www.wise-women.org/resources/listarchives/css03/mytest.html, including [someone's] CSS.

Editor's Note: If you get an error message, try these links:




Recommendations and Reviews for web professionals.

List Archives

Project WW Archive: how you can help us to build up a treasure trove of useful information.

List of available archives

Alphabet Soup

Essential terminology for the serious web professional.


Printable version of this page

Link to us

Join the discussion lists

passionate about the web