Jump to content

Recommended Posts

Here is the site:

http://hoosierhoopsreport.com

 

If you scroll down, just above the footer on the right hand side are my image galleries. There is a gap, due to one of the titles being three lines instead of two. It only affects the left column. The DIVs are set to float left, and I want to get rid of that gap without changing the width or font size.

 

I've tried bigger margins, as well as padding.

 

Here is the CSS and code:

 

<style type="text/css">
.menu-item {
float: left;
position: relative;
width: 100px;
font-weight: bold;
line-height: 15px;
font-size: 10px;
padding: 5px;
display: inline-block;
}

.menu-item a {
font-weight: bold;
color: #000;
text-decoration: none;	
}
.menu-item a:hover {
text-decoration: underline;
}
</style>
<div class="menu-item">
<a href="{=gallery.link}" title="{=gallery.title}"><img src="{=image.url}"{=image.output_width_tag}{=image.output_height_tag} alt="{=gallery.title}" />{=gallery.title}</a>
</div>

 

 

Link to comment
https://forums.phpfreaks.com/topic/220194-divs-and-floats/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.