Help with Alignment

Questions and tutorials related to Cascading Style Sheets *all versions*

Moderators: egami, macek, gesf

Post Reply
aksstgsb
New php-forum User
New php-forum User
Posts: 13
Joined: Fri Dec 13, 2013 3:57 am

Tue Jan 07, 2014 10:38 pm

Yes I too having similar kind of problem in my site. So for that I fixed it with the table <tr><td> tags. But I want to do it without using it. Help us out with it.

User avatar
WebOutGateway
New php-forum User
New php-forum User
Posts: 65
Joined: Mon Jun 13, 2011 9:25 pm
Location: Pasig City, Philippines
Contact:

Mon Jun 09, 2014 9:14 pm

Hi!

You can add padding in your #Container. The padding will clear an area around your #Container. You can specify the padding of your top, bottom, left and right sides individually:

Code: Select all

padding-top: 100px;
padding-bottom: 100px;
padding-right: 50px;
padding-left: 50px;
Or:

Code: Select all

padding: 100px 50px 100px 50px;
which specifies the padding of top, right, bottom, and left respectively.

You can also search other ways on how to specify your padding.
I hope this helps. Thank you.

johnmacd
New php-forum User
New php-forum User
Posts: 72
Joined: Wed Jun 12, 2013 9:30 pm
Contact:

Fri Apr 08, 2016 4:31 am

Hi,

Try this:
<div style="text-align:center;">
<div style="border:1px solid #000; display:inline-block;">Div 1</div>
<div style="border:1px solid red; display:inline-block;">Div 2</div>
</div>

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests