Css Style Sheets
Need some help with CSS? Want to see what kinds of things you can do using CSS? You've come to the right place!
positioning elements inside a div
I am struggling with correctly positioning 4 elements inside a div using CSS. The solution may include slight changes to the markup, so consider the following example XHTML
<div id="enter_exit_buttons">
<p id="enter_button"><a href="mainpage.html"><img src="images/enterbutton.jpg"
alt="enterbutton.jpg" /></a></p>
<p id="exit_button"><a href="http://www.gottago.com"><img src="images/exit.jpg"
alt="exit_button" /></a></p>
<p>Website Template By: some name you can't see</p>
<p>Copyright © 2007 awebpage.com.com || All Rights Reserved.</p>
</div>
At present, there are no existing rules in the CSS file for #enter_exit_buttons or it's contents. The div above the enter_exit_buttons div has a padding-bottom: 30px; rule in place so I have some room "over my head" so to speak.
What I need is for the first two elements (enter_button, and exit_button) to be centered on one line seperated by 30 or so px. The last two elements also need to be centered, each on it's own line.
One XHTML book, and next to zero experience with CSS is not getting good results. Some help would be appreciated.
Thanks
<div id="enter_exit_buttons">
<p id="enter_button"><a href="mainpage.html"><img src="images/enterbutton.jpg"
alt="enterbutton.jpg" /></a></p>
<p id="exit_button"><a href="http://www.gottago.com"><img src="images/exit.jpg"
alt="exit_button" /></a></p>
<p>Website Template By: some name you can't see</p>
<p>Copyright © 2007 awebpage.com.com || All Rights Reserved.</p>
</div>
At present, there are no existing rules in the CSS file for #enter_exit_buttons or it's contents. The div above the enter_exit_buttons div has a padding-bottom: 30px; rule in place so I have some room "over my head" so to speak.
What I need is for the first two elements (enter_button, and exit_button) to be centered on one line seperated by 30 or so px. The last two elements also need to be centered, each on it's own line.
One XHTML book, and next to zero experience with CSS is not getting good results. Some help would be appreciated.
Thanks
Related Articles
Comments
Be the first to leave a comment!
About the Author
From Our Partners
People in Pictures
Top Geek Articles
|
Celebrities on the Phone
Cell phones are to celebrities like bats are to baseball: no one runs too far without them.
|
|
Why every guy should buy their girlfriend Wii Fit.
Gratuitous...
|
|
Hot Geeks -- The Sexiest Geeky Girls
These girls are gorgeous AND they'll play Warcraft with you. Doesn't get much better than that.
|




