Jump to content

Best way to vertical align these elements


DarkxPunk

Recommended Posts

Hey everyone,

 

http://www.beta.sunburstrarediamonds.com <- If you check there you can see all the css/html

 

Currently I am aligning the elements under the header by using table/table-cell with CSS. Is there a superior way to do this or is this the best way?

 

Thanks for the input.

Link to comment
Share on other sites

Try section and id, make it relative and place it where you want

	<body>		<header>			<div id="logoWrap">				<img class="logogram" src="images/logo.png" width="77px" height="50px" alt="Sunburst Rare Diamonds Incorporated Logo"/>				<div id="logotype">					<h1>Sunburst Rare Diamonds</h1>					<h2>INCORPORATED</h2>				</div>			</div>			<a class="tollFree">1-844-RAREGEM</a>		</header>              <section id= "menu">		<p>Text 1</p>		<p>Text 2</p>            </section>	</body></html>
Edited by L8V2L
Link to comment
Share on other sites

Try section and id, make it relative and place it where you want

<body>		<header>			<div id="logoWrap">				<img class="logogram" src="images/logo.png" width="77px" height="50px" alt="Sunburst Rare Diamonds Incorporated Logo"/>				<div id="logotype">					<h1>Sunburst Rare Diamonds</h1>					<h2>INCORPORATED</h2>				</div>			</div>			<a class="tollFree">1-844-RAREGEM</a>		</header>              <section id= "menu">		<p>Text 1</p>		<p>Text 2</p>            </section>	</body></html>
I am using divs... I just styled the elements using display table/table-cell. The only issue I see with absolute positioning is you need to know the exact dimensions of the box, which I don't want...
Link to comment
Share on other sites

I am using divs... I just styled the elements using display table/table-cell. The only issue I see with absolute positioning is you need to know the exact dimensions of the box, which I don't want...

... Yeah that's part of the beauty, and that type of information is obtainable if you need screen side via EMCAScript.
Link to comment
Share on other sites

... Yeah that's part of the beauty, and that type of information is obtainable if you need screen side via EMCAScript.

*squint in confusion* I wanna center this with as little over head as possible. I know nothing of emcascript, but that sounds like extra over head when all I wanna do is optimise my design...
Link to comment
Share on other sites

  • 2 weeks later...

What specifically are you trying to center? I only see an image of a diamond under the header.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...