I am trying to;
Make the text for each link in the drop down menu to be one line only, not 1 - 3 lines. I used
.mkdf-drop-down .second .inner>ul,
li.narrow .second .inner ul {
padding-right: 50px !important;
}
to increase the right
padding but the title still stops at the original point. I am new to css and learning as I go so I am wondering if the css is wrong
I would also like to remove the underline on the text
I've been researching this for a couple of days now and all I have managed to do is the padding.
Website is http://www.agileseo.com.au/beacon
Padding won't help in your case as it will increase the space around the text, so remove it. You must add more width to the container.
I have a logo wrapped in a div with class="title-logo-wrapper fl"
I am trying to remove (or decrease) whitespace between my logo and the main nav.
The div contains the a and img elements but looking at "inspect element" these do not appear to be the problem. It is the div.
I cannot figure out how to remove the whitespace between the bottom of the logo and top of the main navigation.
Since I am using a CMS, there is quite a chunk of HTML code between the two elements. I am reluctant to add it to the question.
Would anyone mind taking a quick peek here: http://tinyurl.com/ovstqug
Try this:
#header hgroup {
margin-bottom: 0;
}
I have a drop down navigation that works perfectly when positioned via a left CSS property.
http://jsfiddle.net/durilai/nmME4/1/
You can see that the dropdown adjusts to the width of the content, however I would like to position right. When I do the width of the drop down will not adjust to the content. You can see this behavior at the fiddle below.
http://jsfiddle.net/durilai/cTSJt/2/
Any help is appreciated, also any knowledge into what is causing this behavior is also appreciated.
The right: 100px in ul seems to be setting a width of 100px.
If that does not need to be positioned absolute, then use float: right; and use margin-right: 100px; instead.
JSFiddle: http://jsfiddle.net/cTSJt/12/
Ok so basically, from what I can see, the issue was being caused by using the element (in this case ul) directly as the selector.
I believe this was interfering with the below ul elements within your CSS. Simply changing the first CSS rule from ul to your ID (Navigation_Main) fixes the issue.
Fixed example > http://jsfiddle.net/cTSJt/10/
Thanks
Have you tried using div's instead of the unorder list (ul) element. As you are using CSS to striping off all the default styling that makes a "ul" a list element why not use a div to start with. I can't guarantee it will solve the problem but it eliminates unnecessary CSS and you might beable to spot the issue more easily
And in reality shouldn't a ul only be used for bullet point items, in a text document?
This is a problem that I run into frequently:
Given some horizontal nav links, what ways are there to ensure that the links don't squash together such that they'll push up or down onto two lines?
I thought that just setting a min-width for the container of those nav links would work (e.g. setting the ul or a container div of the ul to min-width:500px) but as the example shows, that isn't enough. I feel like I'm just missing something simple, but it's an unknown unknown.
Edit: I removed some margin on the li elements and it finally stopped wrapping to two lines. I still don't understand why added padding was causing the wrapping as opposed to simply expanding the width of the containing elements, though.
So what techniques do you guys have for making nav links stay in a horizontal bar formation?
Here is a jsfiddle with roughly the current example that I'm working with:
http://jsfiddle.net/tchalvakspam/nE8yU/5/
Do you want them to be visible? One option if you don't want them to wrap is to just have them not be shown. If you want to do that, this will work:
#admin-header {
overflow: hidden;
white-space: nowrap;
}
I'm using a background image to add a custom bullet to list items in my content. In the content there are also images floated left. When an image and a list item are next to each other, the bullet appears where it would do if the image wasn't there, but the text wraps around the image.
Here is an example:
http://golf2.test.textmatters.com/content/greenkeepers/turfgrass/turfgrass_speci/cool_season_gra
is there a way to make the bullet appear where is should (i.e. next to the text)?
In Firebug / Firefox (you'll have to check other browsers) I solved your problem adding a:
li {
overflow:hidden;
}
Don't know why exactly, but that magical line solves lots of problems around floated stuff :-)
Edit: Solution if you can change the html slightly
If you have any control over the html, you could perhaps use paragraph tags instead of list items:
p.list_item {
background: transparent url(/++resource++stylesheets/images/bullet.gif) no-repeat scroll left 0.45em;
padding-left: 11px;
}
However, that would kind of change the semantic meaning of the list items...
This is an old topic... but thought I would add how I usually do this in case someone stumbles in here via a search...
If I have an image on the left, and plan to have graphic bulleted unordered list (UL) to the right of it, I place the image statement inside DIV tags, and add a float:left style to that DIV.
Then, I wrap my UL tags inside a DIV, and give that DIV a float:left style as well, causing it to appear to the right of the first DIV.
If I have additional text that I would like to resume UNDER my UL, then I give the second DIV a width that equals the total width of the page/column minus the graphic width - basically, to account for all of the space to the right of the image. That will force continuing text to flow directly under the UL DIV, and if the UL is shorter than the graphic, the text will flow to the right of the graphic and then under the graphic as expected.
If the UL extends lower than the graphic, then the text will just start under the image, as expected.
If you want the text to simply start UNDER the left graphic regardless of the height of the UL, then you could just apply a clear:both style to the ensuing , i.e.
In general this approach works so long as the UL isn't too much taller than the left image, because obviously in this scenario, the list itself isn't going to wrap under the image, leaving whitespace - so to make a long list look right may require some purposeful image sizing, or stacking a couple of images in the first DIV, or whatever other solution you might have.
If you really want to get whacky, I've had a few times where I've used the two DIV method described above, but setting the first DIV to position:relative, and placing the second DIV containing the UL INSIDE the first, with a position:absolute and of course top:??px and right:??px, set of course to absolutely position my UL to the right of the image. It takes the right kind of layout to use this method, obviously...
OK that's all I had to say, hope this makes sense & good luck to whomever!
Try wrapping your list items in a <p> tag, and then give that tag a left margin.
Why do you have div.fig width set to 0 in the html?
<div class="fig" style="width: 0px;"><img src="/images/43_Fescue.jpg" float="0"/></div>
Remove that and the list will float around the image.
Well, it's not the best fix from a stylistic point of view, but floating the images right avoids this problem. Thanks for everyones suggestions
If you want the whole ul to NOT float under the image try adding overflow:hidden to the ul