These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:21 pm Advanced search

Two sections side by side

Here you can discuss things related to HTML and the Web in general that do not fit in to other categories.

Two sections side by side

Postby Long Con » Fri Aug 20, 2010 2:03 am

I know this is a way simpler question than you guys are probably used to, but I'm just learning, so here goes.

I want to have a section of a page where there are two 'blocks', each 50% of the page-width, side by side. The content inside the blocks has the same layout, but how do I code those two blocks to be side-by-side?
Long Con
<h5>
 
Posts: 11
Joined: Fri Jun 11, 2010 4:48 pm

Postby JAB Creations » Fri Aug 20, 2010 3:55 am

Code: Select all
<section style="float: left; width: 50%;">

<div style="margin: 8px;"><p>stuff</p></div>

</section>


<section style="float: left; width: 50%;">

<div style="margin: 8px;"><p>stuff</p></div>

</section>
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Postby Long Con » Fri Aug 20, 2010 3:56 am

style = float, eh? Thanks again, JAB!
Long Con
<h5>
 
Posts: 11
Joined: Fri Jun 11, 2010 4:48 pm

Postby JAB Creations » Fri Aug 20, 2010 5:04 am

No problem. The float property is part of CSS level 1, I'd recommend reading more about how CSS works. Some tutorial sites have nice visual examples too.

Also that is inline styling, you should stick to using classes instead.
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Postby loganeco » Wed Sep 15, 2010 3:14 am

I just got almost the same questions, thanks for the thread.
loganeco
<h6>
 
Posts: 2
Joined: Wed Sep 15, 2010 3:05 am
Location: united states


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests