Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,195,320 members, 7,957,857 topics. Date: Tuesday, 24 September 2024 at 10:12 PM

Html - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Html (753 Views)

How To Integrate Sms To A Online Registration Form (php, Html, Aspx Etc) / How To: Create A Simple Hover Button With Html And Css / How To Create An Autoresponder In An Html Form (2) (3) (4)

(1) (Reply) (Go Down)

Html by muktar9: 9:27am On Oct 15, 2012
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.car
insurancequotesinformation.
com&quot;>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?.
Re: Html by yawatide(f): 10:55am On Oct 15, 2012
Maybe something like this (I am using inline CSS but in your code, add this to a CSS files):

<div style="float: left; width: 300px;border: 1px solid red;">content for DIV 1</div>
<div style="float: left; width: 300px;border: 1px solid red;">content for DIV 2</div>
<div style="float: left; width: 300px;border: 1px solid red;">content for DIV 3</div>
<br style="clear: both;" />

Note:
1) The widths could be anything you want it to be, and not necessarily 300px
2) I am only adding the border color for visualization purposes
3) You always want to "clear" floated elements so that flow returns to the page

Good luck!
Re: Html by maninmood(m): 9:35pm On Feb 02, 2013
muktar9: 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.car
insurancequotesinformation.
com&quot;>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?.


This looks like position: relative

It does not look like float as explained by yawa-ti-de...Float always has to do with 2 boxes( width,height), you can either float a box to left or right.

You can do this:

Selector
{
position: relative;
width: ..px;
height: ..px; <!-- .. indicates you insert your desired number -->
border: 1px solid black;
border radius: px <!-- This is if you want to make it specific -->

}

Go over google and look up

relative position, absolute position, fixed position, etc Other keyword to add is css
Re: Html by yawatide(f): 9:38am On Feb 03, 2013
^^^Hmmm, I would be careful about positioning stuff. Besides, if you want to do position relative, you may still need your "top/bottom" and "left/right" attributes, no?
Re: Html by adewasco2k(m): 11:11am On Feb 04, 2013
maninmood:


This looks like position: relative

It does not look like float as explained by yawa-ti-de...Float always has to do with 2 boxes( width,height), you can either float a box to left or right.

You can do this:

Selector
{
position: relative;
width: ..px;
height: ..px; <!-- .. indicates you insert your desired number -->
border: 1px solid black;
border radius: px <!-- This is if you want to make it specific -->

}

Go over google and look up

relative position, absolute position, fixed position, etc Other keyword to add is css



i totally disagree white you, not that you cant do it with positioning but that you cant achieve that with a float attribute....you can float as many divs as possible not just two divs.

take this example.

if you have a container with width="600px";
and you have 6 divs with width="100px";
(i am just going to neglect the margins here)
floating the 6 of the divs either left or right will give you a horizontally displayed divs. i told you i neglected the margins of the divs and with mind that the contain has padding="0px";

so i go with yawa-ti-de grin grin mind you i am still learning
Re: Html by soloqy: 11:35am On Feb 04, 2013
adewasco2k:

i totally disagree white you, not that you cant do it with positioning but that you cant achieve that with a float attribute....you can float as many divs as possible not just two divs.

take this example.

if you have a container with width="600px";
and you have 6 divs with width="100px";
(i am just going to neglect the margins here)
floating the 6 of the divs either left or right will give you a horizontally displayed divs. i told you i neglected the margins of the divs and with mind that the contain has padding="0px";

so i go with yawa-ti-de grin grin mind you i am still learning

You and Yawatide are totally right on this. Getting the boxes line up horizontally, has nothing to do with relative positioning.
Re: Html by maninmood(m): 12:11am On Feb 08, 2013
soloqy:

You and Yawatide are totally right on this. Getting the boxes line up horizontally, has nothing to do with relative positioning.


You can fix it with relative positioning, inline-block,etc. HTML is dumb, tweak it a little and it is all yours.

(1) (Reply)

Is Pheed The New Twitter? / EFCC Funny Viagra Ad / Evaluate Pls

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 19
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.