4 replies [Last post]
vkm2004
vkm2004's picture
User offline. Last seen 1 year 24 weeks ago. Offline
newbie
Timezone: GMT+5
Joined: 2010-08-13
Posts: 3
Points: 4

I'm very new in CSS.

Before posting here i searched but things were too mixed and confusing for me to understand so starting a new topic.

I want to know how to add line break after where i mentioned in code.

CSS

.container {
  margin-left: auto;
  margin-right: auto;
  width: 13.75em;
}
 
.container .box {
  border: 1px solid black;
  background-color: gray;
  color: black;
  float: left;
  line-height: 1.5;
  margin: 0.5em;
  text-align: center;
  height: 1.5em;
  width: 1.5em;
 
}

HTML:

<body>
 
<div class="container">
 
<div class="box container">1</div> // I need here line break
<div class="box container">2</div> // I need here line break
<div class="box container">3</div> // I need here line break
 
</div>
 
</body>

Please help me.
Thanks in advance.

Deuce
Deuce's picture
User offline. Last seen 2 days 17 hours ago. Offline
rank Guru
Guru
Timezone: GMT-6
Joined: 2005-11-20
Posts: 4416
Points: 1835

Remove float: left;

Remove
float: left;

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

vkm2004
vkm2004's picture
User offline. Last seen 1 year 24 weeks ago. Offline
newbie
Timezone: GMT+5
Joined: 2010-08-13
Posts: 3
Points: 4

Deuce wrote: Remove float:

Deuce wrote:

Remove
float: left;

on preview at DreamWeaver shows line breaks but not on browser.
I tested on firefox, IE6 and latest Google Chrome.

any further advice please.

vkm2004
vkm2004's picture
User offline. Last seen 1 year 24 weeks ago. Offline
newbie
Timezone: GMT+5
Joined: 2010-08-13
Posts: 3
Points: 4

Deuce wrote: Remove float:

Deuce wrote:

Remove
float: left;

on preview at DreamWeaver shows line breaks but not on browser.
I tested on firefox, IE6 and latest Google Chrome.

any further advice please.

Deuce
Deuce's picture
User offline. Last seen 2 days 17 hours ago. Offline
rank Guru
Guru
Timezone: GMT-6
Joined: 2005-11-20
Posts: 4416
Points: 1835

Show a link. Don't preview in

Show a link. Don't preview in Dreamweaver, it's not a browser. No one will go to your site using DW as a browser. Remove the width: 1.5em

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph