• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

CSS alignment problems

Hi Guys,

I'm having trouble with some alignment. I have a main div called 'left_sidebar' that has a few elements contained within it. At the top is a div that contains a user's profile pic, their name, and a link to edit their profile. Below that will be some navigation links, and some other items that will be dynamically populated depending on the page.

The div that contains the photo, name, and profile edit link is giving me some trouble.

Here's a pic of how it is currently

profile_bar_current.jpg


Here's what I'm hoping to get.

profile_bar_needed.jpg



Below is the code I have. Nothing is being inherited that should affect how it's laid out or presented.

Thoughts? I'm racking my brain and can't get this right. Also.. I need the border div to expand since the height of the image will not be set in stone.

Code:
#left_sidebar 
	{
	float: left;
	margin: 0 0 .5em .5em; 
	width: 160px;

	}

#left_sidebar_border
	{
	border: 1px solid #e87b02;
	overflow: auto;
	height: 100%;
	margin: 0em 0em 1em 0em;
	}
	
#left_sidebar_pic 
	{
	margin: .5em .5em .5em .5em;
	}

#left_sidebar_name_action_container
	{
	margin: 0em 0em 0em 0em;
	}
	
#left_sidebar_name_action 
	{
	}


#left_sidebar_name 
	{
	}



<div id="left_sidebar">


	<div id="left_sidebar_border">


		<div id="left_sidebar_pic">

	

			<a href="http://details.at/members/members.cfm?q=mpv1&url=jasonallenking">

				<img style="float:left"src="http://details.at/imagehost/profiles/539/xs_IMAG0513.jpg">

			</a>

		

		</div>



		<div id="left_sidebar_name_action_container">


			<div id="left_sidebar_name">

				<span class="mediumboldtext">

					<a href="http://details.at/members/members.cfm?q=mpv1&url=jasonallenking">
						Jason King
					</a>

				</span>

			</div>

	

			<div id="left_sidebar_name_action">

				<span class="mediumtext">
					<a href="http://details.at/members/members.cfm?q=pbi">edit profile</a>

				</span>

			</div>		

		</div>

	</div>


</div>
 
Last edited:
Remove div #left_sidebar_pic entirely, moving the anchor inside up a level. Give the profile img itself a class, float it left and put .5em margins all around. Float #left_sidebar_name_action_container left. Remove 100&#37; height from #left_sidebar_border
 
BTW, if you post the entire HTML for that page I will look at it, but I'm not going to construct the page and then fix it. 🙁
 
Back
Top