22 replies [Last post]
Sallana
Sallana's picture
Offline
Regular
Last seen: 12 years 4 weeks ago
Timezone: GMT-5
Joined: 2010-03-31
Posts: 11
Points: 14

So first of all, I'm posting this here because I wasn't sure where else to put. I chose here since the site I'm currently developing is a wordpress blog, so it seemed like the right choice.

First of - Here's the link to the page: http://www.kirschfamilycomputerservices.com/sam/wheresthefairness/#

Now, here's what I want to know. Note the links to posts under the "Most Recent Cases" header. What I want is for the entire li section to be highlighted in red when you hover over a link, not just the link itself. Why? No huge reason. I just think it will look cool, but I've really got no idea how to make it work.

So here's the code


The PHP/HTML

<div id="posts">
<?php $temp_query = $wp_query; ?>
<?php query_posts('cat=0&showposts=8'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php $do_not_duplicate[$post->ID] = $post->ID; ?>
<li><a href="<?php the_permalink();?>" title="<?php the_title();?>"><?php the_title();?></a><span class="date"> at <?php the_time();?></span></li>
<?php endwhile; else: ?>
<?php endif; ?>	
</div>

The CSS

#posts {
		width:  620px;
		float: left;
		border-bottom: 1px dotted #f2f2f2;
		margin-left: -20px;
}
 
#posts a:link {color: #000000; font-weight: bold;}
#posts a:visited {color: #000000; font-weight: bold;}
#posts a:hover {background-color: #CC0000; color: #000000; font-weight: bold; width:630px;}
 

Thanks in advance for any help on this little conundrum Smile

Sallana
Sallana's picture
Offline
Regular
Last seen: 12 years 4 weeks ago
Timezone: GMT-5
Joined: 2010-03-31
Posts: 11
Points: 14

Wow, I really cannot figure

Wow, I really cannot figure out how to edit this post...

I left part of the CSS out -

#posts li {
	border-top: 4px solid #f2f2f2;
	border-right: 4px solid #f2f2f2;
	list-style-type: none;
}

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 8 years 12 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

It might help to clarify what

It might help to clarify what you mean by 'List Section' and hover which anchors? although looking at your loop it's just a series of category posts links? so each li element simply contains the permalink post title? if so and you wanted to hover the anchor text and have the actual li element background changed then you would set the anchor to display:block so that it would fill it's parents dimensions.

On the other hand if you want to higlight say the whole block i.e ul parent then CSS does not provide for transversal back up the DOM it can only apply styles in a forward direction or flow, scripting can provide a solution, by using jQuery (available by default with WP) you can make use of it's xpath capabilities and do something that says 'for this element do this action on it's parent' so you could add a class on hover of the anchor to it's parent and style that class.

btw your markup or script looks incorrect as it doesn't appear to provide a ul parent for the looped li items.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Sallana
Sallana's picture
Offline
Regular
Last seen: 12 years 4 weeks ago
Timezone: GMT-5
Joined: 2010-03-31
Posts: 11
Points: 14

Thank you very much! Setting

Thank you very much! Setting the display to block worked like a charm. There are no UL parents for a reason, but it's a long and convoluted reason so just trust me. My motto: If it looks good and doesn't break anything - It's not wrong. Tongue

Also my apologies if I lacked some clarity, re-reading the post, it was a bit cryptic. I've been cramming in some last minute work for clients so that everyone can have a nice X-Mas vacation! Unfortunately this leads to a lot of sleep deprivation and too much caffeine, which has a tendency to affect your articulation.

However thanks again for the quick response and perfect solution, have a very merry Christmas!

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 8 years 12 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

:0 hmmmmmm it's Christmas so

:0 hmmmmmm it's Christmas so I wont push the issue Smile

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 5 years 37 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

Sallana wrote: My motto: If

Sallana wrote:

My motto: If it looks good and doesn't break anything - It's not wrong. Tongue

Hugo wrote:

:0 hmmmmmm it's Christmas so I wont push the issue Smile

I will, because that's a horrible motto. Probably one of the worst I've ever heard.
You might as well have the motto "I'm really bad at my job, but I hide it from those who don't really understand what I do, so they never complain."

Take pride in your work.

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

Sallana
Sallana's picture
Offline
Regular
Last seen: 12 years 4 weeks ago
Timezone: GMT-5
Joined: 2010-03-31
Posts: 11
Points: 14

First of all - It was a

First of all - It was a light-hearted joke, hence the ":p"
Secondly - I have about 15 clients and 30,000$ just from the past 5 months to prove I'm not horrible at my job.
And lastly, obvious troll is obvious Wink

regia
regia's picture
Offline
Enthusiast
San Diego
Last seen: 7 years 46 weeks ago
San Diego
Timezone: GMT-4
Joined: 2010-10-24
Posts: 313
Points: 360

Wow

Making good money girl, I'm impressed Big smile but then I'm not a "Guru" Tongue

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 5 years 37 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

Sallana wrote: First of all -

Sallana wrote:

First of all - It was a light-hearted joke, hence the ":p"
Secondly - I have about 15 clients and 30,000$ just from the past 5 months to prove I'm not horrible at my job.
And lastly, obvious troll is obvious Wink

Sorry. I don't take my profession lightly. I'm pretty serious about what I do and how I provide for my family.
Also, as I mentioned, you might just be good at hiding these issues from your clients, so they keep paying, not knowing any better. I don't really care how much money you make by lying to your clients.
Lastly, you're the one who came here bragging about all the money you make by ripping off your clients... not sure how that makes me the troll?

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

Sallana
Sallana's picture
Offline
Regular
Last seen: 12 years 4 weeks ago
Timezone: GMT-5
Joined: 2010-03-31
Posts: 11
Points: 14

I'm not entirely sure what

I'm not entirely sure what issues you're talking about. None of the websites I provide are set to explode. They all work perfectly and are tested thoroughly. All follow WWWC standards. The UL opening and closing tags are nested in a separate part of the code. If you can't make light of something, don't bother to live.

Sallana
Sallana's picture
Offline
Regular
Last seen: 12 years 4 weeks ago
Timezone: GMT-5
Joined: 2010-03-31
Posts: 11
Points: 14

regia wrote: Making good

regia wrote:

Making good money girl, I'm impressed Big smile but then I'm not a "Guru" Tongue

Wordpress, Joomla, and other CMS's are VERY sought after nowadays. Spend some time learning your way around these things, and clients will pay big bucks. And it's mostly just styling the page to look the way they want, and using plug-ins to generate whatever backend utilities they require. You very rarely have to stick your hand in any real PHP or scripts, and it's rather lucrative. I'm sure the well will run dry eventually, but then you just learn the next big thing. Don't be impressed, really. My husband grew up in the rich part of Manhattan, his dad was some big-shot doctor so he's got a lot of connections. I'm nothing to be impressed over, I'm just lucky.

It's who ya know. Ya know?

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 2 years 6 weeks ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

Sallana][quote=regia

Sallana][quote=regia wrote:

Wordpress, Joomla, and other CMS's are VERY sought after nowadays. Spend some time learning your way around these things, and clients will pay big bucks.

And you will be, and are, part of the problem. And part of the reason most web pages suck. If you feel good for taking money for that, then we come from different cultures and I suggest you find a different forum where they will tell you how wonderful and wise you are, instead of the truth you will get here.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

Sallana
Sallana's picture
Offline
Regular
Last seen: 12 years 4 weeks ago
Timezone: GMT-5
Joined: 2010-03-31
Posts: 11
Points: 14

I mean, this isn't exactly a

I mean, this isn't exactly a 'noble' profession. No ones lives depend on the base we use to design our websites. The fact that you are so arrogant when it comes to something so futile is quite frankly the most pathetic thing I have ever seen. I go where the money is. That's the point of having a job.

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 2 years 6 weeks ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

Sallana wrote: I mean, this

Sallana wrote:

I mean, this isn't exactly a 'noble' profession. No ones lives depend on the base we use to design our websites. The fact that you are so arrogant when it comes to something so futile is quite frankly the most pathetic thing I have ever seen. I go where the money is. That's the point of having a job.

I think we will disagree about who is the most pathetic person here.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 5 weeks 2 days ago
Timezone: GMT-5
Joined: 2009-10-09
Posts: 2057
Points: 2289

(No subject)

regia
regia's picture
Offline
Enthusiast
San Diego
Last seen: 7 years 46 weeks ago
San Diego
Timezone: GMT-4
Joined: 2010-10-24
Posts: 313
Points: 360

Please everyone

Lighten up, it's the Christmas season! Let a little holiday spirit and cheer lighten our lives, there is enough strife, poverty, war and hunger. Could a mod please close down this post, it is really going nowhere, except steadily downhill.

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 5 weeks 2 days ago
Timezone: GMT-5
Joined: 2009-10-09
Posts: 2057
Points: 2289

regia wrote: ... Could a mod

regia wrote:

... Could a mod please close down this post, it is really going nowhere, except steadily downhill.

Second.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 8 years 12 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Calling time on this thread

Calling time on this thread now. No further comments unless they are constructive and about coding, Thanks.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 2 years 4 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

I'm constructive! Well, I am.

@ the OP:

The problem with the markup is that the syntax is broken, and the structure of a list is malformed. That may work every time for you, but it is just as liable to grow big teeth and latch onto your hind-quarters. It would serve you well, and if done in the course of the work, cost you little or nothing, to be sure your markup is valid, well structured and semantic.

Also, please don't respond to ad hominem arguments.

@ Ed and deuce:

OK, younguns. (Yes, Ed, I know you're an old fart like me.) Both of you are making puerile ad hominem attacks on the OP that are completely unnecessary and undesirable on the forum. Please stop it. I understand your disagreement with the OP's statement, but a more calm and rational, non-confrontational argument could have been made.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Sallana
Sallana's picture
Offline
Regular
Last seen: 12 years 4 weeks ago
Timezone: GMT-5
Joined: 2010-03-31
Posts: 11
Points: 14

Yeah, I mean.. Thanks for

Yeah, I mean.. Thanks for backing me up and all. I appreciate it and I appreciate the advice. I've just begun my journey into my career, so mistakes are made. However, I came here to ask a simple question about a hover style, which was answered, and through a meaningless joke I was attacked relentlessly... Because, I make a lot of money.

The hostility shown here over the fact that I've been learning to master the CMS world is just absolutely crazy. I don't know if you people think that I CAN'T build a website from the ground up, or if you're just jealous because I'm more lucrative than you. Or if you think I'm taking the easy way out. But I CAN build a website using nothing but notepad and photoshop(www.kirschfamilycomputerservices), and I'm not taking the easy way out.

CMS's are desirable for clients because they don't know how to code. So if something on the website needs to be updated or changed, they have to get a friend who knows what they're doing, or keep their website designer on hand. With a CMS, you create a website with many modules and plug-ins which will allow your client to have more control over their website without having to know what they are doing, and in a pleasing and easy to navigate environment.

I've seen no examples of how Wordpress and Joomla or other CMS software are destroying the industry of website design, other than allowing people who don't know how to design a website, to create one rather easily without having to know how to code.

So are you butthurt about it because you think it's something similar to having a robot take your job away? Or are you just not keen on learning the new technology? Either way the consensus is still that you're pathetic.

For the record, CSS "gurus" you can use the <li> tag on its own if you style it. By doing that, you're simply using it as a generic tag to style, and if you're good enough, you can remove any markup that might cause an issue. But as I've already said, the <ul> parents are present in the code, I simply didn't display that part of the code. That got ignored so you ravenously attack me personally like starved raptors.

There was nothing WRONG with my code. I came here because I simply wanted to know how I would use CSS to style an anchor which would fill it's parent. My code wasn't broken, there was no issue. I could have just as easily googled it and figured it out in 20 minutes on my own, but when this site came up in google, I thought it was a good opportunity to meet some nice people and get involved in a cool community.

There are probably nice people here. This Gary guy seems kind enough. But I see no reason to spend any more time here, if every post I make is just going to be attacked by over-jealous and insecure children.

Anyway, flame me all you want, I really don't care. In the end I've still got a good paying job, a healthy kid and a great husband, and there are better places to waste my time.

Cheers. Wink

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 5 weeks 2 days ago
Timezone: GMT-5
Joined: 2009-10-09
Posts: 2057
Points: 2289

*sigh*

*sigh* Stare

regia
regia's picture
Offline
Enthusiast
San Diego
Last seen: 7 years 46 weeks ago
San Diego
Timezone: GMT-4
Joined: 2010-10-24
Posts: 313
Points: 360

Eh hem

I did ask for this post to be closed down because it was becoming inflammatory and totally unproductive. It should have been, this could go on forever >) Arrow Arrow Arrow Arrow Arrow

Please let's close this one down.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 8 years 12 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

No regia it won't go on for

No regia it won't go on for ever and I am now closing it as it has run it's course. Closing threads is always a last resort, I asked that if it were to continue it continued along firm coding lines only, however Sallana's last right to reply was fair enough comment; and I see that as the natural conclusion to the thread.

@Sallana sorry your first experience of the forum wasn't the best but it's not utterly indicative of the normal experience so hope you stick around.

Quote:

This Gary guy seems kind enough

Oh don't be fooled, wolf in sheeps clothing that Gary is, however I'm quite kind Innocent

Thread now closed.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me