Thanks for the input Kalon. I don’t know what im doing wrong, because the text just wont budge.
Im trying to make a button like affect when someone clicks on the one of links in my nav bar. I have the text-shadow making a glow like affect when someone hovers their mouse over a link. In addition to that, I am trying to get the text to move over a bit too.
without seeing all your html and css it’s not obvious to me what the problem is. but I see you have a left style assigned but no position syle. I think top and left styles also need a position style for them to work.
Anyway, hopefully this demo will help you.
When you hover the “span text”, it moves to the right by 10px.
Im trying to get the text in the nav menu to nudge left a bit individually, as a visitor hovers their mouse over each item. I understand what you are saying about adjusting the margin on :hover, but my site’s sections are scaled in percentages and the layout is liquid. Now I have no idea where to start
Thanks donboe, that seems like a logical approach, but i think im missing something here. It doesnt seem to make an affect when I insert that code. I think it has something to do with the text being centered, not aligned to the left? would i just add more padding until i see a difference? But that causes another problem, the menu options all have different lengths, eg “home” and “phone selection”
Im so confused! thanks again if you think you can help.
Hope that helps. But I am right in saying that the problem here is lying with the centered text?
I really just dont want to resort to js, as this is a site designed for viewing on a Blackberry Smartphone. I dont want to throw a spanner in the works with java
To avoid more confusion, just post your complete css. Likewise ryanqm the padding was working for me, but probably there is something else. Don’t know why you center the entire content in the first place though!
Wait! hold up… I made a silly mistake, when i made that test page, i didnt link it to the style sheet i was editing, it linked to the sites main style. Now that I have changed it, when i insert
Yes, sorry about the confusion, i did post the website address though. I centered the content, because well… It mostly looks better at the moment centered, I just change a few parts as i need. Thank you for your help though.
Thanks for the info and thanks a lot for your help!
I now have found myself with another problem… I converted the bottom menu on my site to a horizontal list instead of just a paragraph. its working okay, and with a few tweaks should look the same at the menu on the left… The problem is this, when i add the code I added before to get the hover affect on my text… Well for some strange reason, it adds padding to the right hand side of page, pushing my background image a bit to the left… As you can see on my testing page.
The position: relative property states that you want to position the element relative to where it occurs naturally in the document. So even if the element occurs naturally in the center of the document, by declaring position: relative and nudging it with some left: 10px, you can move it 10px to the right wherever it is.
However, you will notice now that it moves to the right, out past the other elements, and shows a white strip to the left.
You can “fix” this by applying the same background color from your hover elements to the li elements so that when the li background peeks through, it appears the same:
ul.nav li {
background-color: #666;
I personally like the way it sticks out on the right, BUT if you didn’t like this, you could crop it out by setting the overflow of the ul to hidden, so it hides anything that moves past its boundaries:
Thank you so much ryan! There was like 2 px of the background black showing on the right next to the scroll bar. taking out the -y fixed that issue. Thank you!!!
But, I have found another issue that just doesnt seem to go away, I think there is something I am overlooking with this one…
It’s quite simple actually. All I want to do is add a bit to the left and right of the ad panel on the right, “.sidebar2”.
The problem, is that when I try to change this section of my css:
It adds the padding as I want, but for some reason the div displays under my nav, and content divs. As apposed to being on the far right of the page.
I’d tried near everything I know but no difference. I tried changing the widths of .sidebar1 .content .sidebar2 to allow for some added spacing, but all that does is make the ad images wider. Im very confused, and am pretty sure that I am missing some crutial step. If you, or anyone else could help me out with this, and try to explain where I am going wrong. I will be forever in your debt