Jump to content
DarkxPunk

Best way to vertical align these elements

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.

Share this post


Link to post
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

Share this post


Link to post
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...

Share this post


Link to post
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.

Share this post


Link to post
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...

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...