Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

What is the html code to make horizontal boxes

Featured Replies

What is the html code to make horizontal boxes i need to make some boxes go from left to right but all i can find is on top of each other, you can see example here <a href="http://www.carinsura...mation.com">car insurance quotes</a> where the boxes are next to each other, and will this affect the page width on my site.

Someone told me use DIV tags but how do i put this in HTML code?.

Edited by james2005

The link you've given us isn't a proper link. Mind correcting it so we can see your example?

Your link is broken.

The usual method to make elements side by side (including div boxes) is to add float: left; or float: right; to all the elements that you want side by side.

Make sure that the width of any containing element is enough for all the box widths including their side margins, side padding and side borders.

Then clear the floats so that following elements don't appear in the wrong place.

You Can use following code:

 

CSS

==========================================

 

 

#box{

float: left;

width: 1000px; /* as per your requirement */

}

 

#box ul{

margin: 0px;

padding: 0px;

}

 

#box ul li{

list-style: none;

display: block;

float: left;

width: 245px; /* as per your requirement */

margin-right: 5px;

}

 

========================================

 

HTML

=======================================

 

<div id="box">

<ul>

<li>box content will come here</li>

<li>box content will come here</li>

<li>box content will come here</li>

</ul>

</div>

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.