Jack
Jack

Reputation: 99

How to resize DIV element according to browser size?

So here's a project I'm doing for school:

http://graciousevents.co.uk/

The problem is when the browser is re-sized, the photo-gallery moves underneath each other and then the contact DIV gets pushed to the left.

How can I correct this so the contact div doesn't get pushed to the left.

Upvotes: 0

Views: 120

Answers (3)

fungusanthrax
fungusanthrax

Reputation: 190

A particular within the DIV selector, if you want strings to re-size with the browser, instead of pixels, use "em".

Ex. div{ font-size: x em }

Upvotes: 1

Akilsree1
Akilsree1

Reputation: 462

Change CSS using width: 62.5714%; or Use Bootstrap CSS

Upvotes: 0

Austin Collins
Austin Collins

Reputation: 451

Are you using percentages for the sizing? If you give the window a set size and use pixels when sizing everything should stay where it is when you resize the window.

BEFORE:

width: 10%;

AFTER:

width:500px;

Upvotes: 0

Related Questions