14 replies [Last post]
quartzy
Offline
Regular
Last seen: 11 years 17 weeks ago
Joined: 2007-12-23
Posts: 24
Points: 0

Hello
I have a list class last on my menu on the last class I have added a search box which aligns the box to the right, however in IE7 this box sits next to the list and does not look good. Any suggestions?

.vmenu ul li.last {text-align:right;}

HTML

<li class="last"><form class="search" action="http://www.google.com/search" method="get" onsubmit="Gsitesearch(this)"><input name="q" type="hidden" /><input name="qfront" type="text" /><input type="submit" value="Search Site" /></form></li></ul>

Christine

quartzy
Offline
Regular
Last seen: 11 years 17 weeks ago
Joined: 2007-12-23
Posts: 24
Points: 0

re

You can see the site live here (www.bytesizeoffice.co.uk)

Christine

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

Start by fixing those 8 html

Start by fixing those 8 html syntax errors. You also have a couple of CSS syntax errors which should be fixed as well, but the html errors are more important.

If you want browsers to show your page in the standard way you need to feed them standard code. You aren't, so you really shouldn't complain until you do. Would you try to use a Robertson screwdriver to drive a single slot screw into wood?

Ed Seedhouse

Posting Guidelines

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

quartzy
Offline
Regular
Last seen: 11 years 17 weeks ago
Joined: 2007-12-23
Posts: 24
Points: 0

re

Thanks for nothing, not very helpful at all.

Christine

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

So having cleared up those

So having cleared up those errors , finding they didn't change matters you re-introduced them? or did you just decide that wasn't what you wanted to hear and not bother with them.

Having set the LI elements to display: inline I'm not surprised that it's left aligned, I think I would go with floating the LI elements then you can control the widths and possibly float the nested form element to the right.

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

quartzy
Offline
Regular
Last seen: 11 years 17 weeks ago
Joined: 2007-12-23
Posts: 24
Points: 0

re

No I had not removed html errors, cant see any to be frank. the display inline seems to be a good idea for working with, so when I get the time I will do that. Any chance of removing the link to my website?

Christine

css-helper
Offline
Enthusiast
UK
Last seen: 10 years 43 weeks ago
UK
Joined: 2009-04-24
Posts: 120
Points: 4

Some help may be here...

And all you wanted was a little help with a cross browser problem! Yes, there are HTML and CSS errors. And yes, you should always and often validate your code. You should especially do so before posting a request for help. So that's your bad.

But let's dispense with attitudes and just observe that it seems like the errors in your code do not contribute to the problem (except in the sense that there are alternative ways of coding that may be better but that a different issue).

From a cross browser point of view, you might like to try feeding IE a right float in your .vmenu ul li.last declaration block of code. That should sort it - at least in IE6 and IE7. I have not tested it in IE8.

It seems that, given the way you have coded it, standards compliant browsers work as desired with text-align:right but IE needs the right float.

Don't forget though: always, but always validate. Regards

=========================================================================
If you are climbing a mountain the person most useful to you is just ahead of you on the rope (since they are still learning too).
The person who has already made it to the top is usually not much help whilst you are struggling on the rock face.
=========================================================================

quartzy
Offline
Regular
Last seen: 11 years 17 weeks ago
Joined: 2007-12-23
Posts: 24
Points: 0

re

Hello
Yes, I do know about validation, but with 150 or so pages, I just don't have the time and many of the invalidation errors are minor as the site was originally validated. My other shorter websites are all valid, I now use XHTML. I will try to float the list item to the right, did not think of doing that before. Thanks for your help.

Christine

quartzy
Offline
Regular
Last seen: 11 years 17 weeks ago
Joined: 2007-12-23
Posts: 24
Points: 0

re

Hello
Yes, I do know about validation, but with 150 or so pages, I just don't have the time and many of the invalidation errors are minor as the site was originally validated. My other shorter websites are all valid, I now use XHTML. I will try to float the list item to the right, did not think of doing that before. Thanks for your help.

Christine

css-helper
Offline
Enthusiast
UK
Last seen: 10 years 43 weeks ago
UK
Joined: 2009-04-24
Posts: 120
Points: 4

Understood

I am as guilty as the next person when it comes to failing to validate when diagnosing a problem. Sometimes validation is the last thing I think of trying! That said, it is very good practice.

You did report an issue and provided a link to one specific page where that issue was present. The suggestion was that before posting a request for help you would be wise to validate that problem page - if for no other reason than to stop smart alec's like me telling you to validate, or worse running the risk of someone send you away with not a great deal of help beyond telling you have code errors!

Validate the problem page: the other 149 pages can wait their turn. See, size really does not matter!
Regards

=========================================================================
If you are climbing a mountain the person most useful to you is just ahead of you on the rope (since they are still learning too).
The person who has already made it to the top is usually not much help whilst you are struggling on the rock face.
=========================================================================

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

To both of you that are

To both of you that are suggesting that you know about validation, be aware that validating pages is NOT something that you leave until last thing , that is a fruitless exercise as it means that you might well have been labouring to correct issues that were caused by invalid markup and odd browser handling of that mal-formed markup. We validate as we write code checking often and cross browser.

CSS-helper thanks for re-iterating what I had said a few posts earlier regards floating the LI elements however it is necessary to describe a width for this to work cross browser (which I did mention)

Quartzy, I did provide a solution for you to try but you seemed to overlook it :?

If you do have that many pages , then I can understand it would be a chore valadating or at least correcting errors, as sites grow large like this frameworking them tends to be a very attractive option and saves a certain amount of time in having to trawl through each individual page.

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

quartzy
Offline
Regular
Last seen: 11 years 17 weeks ago
Joined: 2007-12-23
Posts: 24
Points: 0

Re

The solution to the problem has been found, so thank for the post to float to the right. Yes, I am keen on validating pages, but it is hard to know what to do with third party scripts like Google and the mistakes they generate, unless you know about JavaScript, it is quite tricky to get pages to validate. In this case if I add

tags like the validator suggests, then my search form would be out of sinc. Wouldn't you agree? I take your point that I could have ensured the page I was asking about I should have validated.

Christine

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

If these are old-ish pages

If these are old-ish pages then use a transitional DTD.

The validator sounds as though it's asking that the form elements be correctly nested i.e no form inputs are allowed as first child of form thus the P or block element to hold them, but where the fieldset element would / should be used, but no the search form shouldn't be out of sync but you might have to adjust a few rulesets?

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

quartzy
Offline
Regular
Last seen: 11 years 17 weeks ago
Joined: 2007-12-23
Posts: 24
Points: 0

re

The template was designed for me when I was learning, (although still learning) by someone else and he told me to use the Strict HTML doctype.
I will try to add the fieldset tags and see if that makes the form validate.

Christine

quartzy
Offline
Regular
Last seen: 11 years 17 weeks ago
Joined: 2007-12-23
Posts: 24
Points: 0

re

I have used the fieldset and the legend on the Google searchform and it does now validate, thank you

Christine