Everything posted by Wickham
-
this website looks different on IE comared to FF
The nav menu is too high in IE7; I made these edits to get it the same in IE7 as Firefox:- #navbar ul { margin-top: 0; } /*new style*/ #navbar li { margin-top: 15px; /*margin-top added*/ font-family:Arial, Helvetica, sans-serif; text-align:center; display:inline; float:left; background:lime;/*#006837;*/ padding: 8px 5px; color:white; position:relative; left:25px; bottom:9px; } I changed the background-color to see the difference between the #nav and the li tag positions. Change my temporary color back to what you had. Do much the same for the footer. I coudn't see the black areas in the sidebar.
-
Browser Compatibility Problem
I've seen that before. Edit like this:- ul#nav li{ font-size: 1.2em; float: left; }
-
Displaying Videos With Shadowbox issue
YouTube give you the embed code on the right side of a page, an object tag with a nested embed tag, and you should put that inside a suitable div in the Shadowbox code, probably with a width and height.
-
IE Vs FF - Page Identification help
No, you can't make them different (unless you use border-bottom instead of underline). It might be a good idea to have a different color for the #nav a:hover, #nav a:focus { text-decoration: underline; outline: none;} because you will have one underline for the page you are on and another for hover or focus on some occasions (focus is used by disabled people to show what link is the next when they click Enter).
-
IE Vs FF - Page Identification help
I can see what you are trying to do where when the user is on a page it underlines the link to show the user what page there on, but this style body#index li#index_nav, body#index#index_a_nav, body#portfolio li#portfolio_nav, body#portfolio#portfolio_a_nav, body#about li#about_nav, body#about#about_a_nav, body#contact li#contact_nav, body#contact#contact_a_nav, body#testimonials li#testimonials_nav, body#testimonials#testimonials_a_nav {text-decoration:underline; color: #D6EAFF; } needs to be on an "a" style body#index li#index_nav a, body#index#index_a_nav, body#portfolio li#portfolio_nav a, body#portfolio#portfolio_a_nav, body#about li#about_nav a, body#about#about_a_nav, body#contact li#contact_nav a, body#contact#contact_a_nav, body#testimonials li#testimonials_nav a, body#testimonials#testimonials_a_nav { text-decoration:underline; color: #D6EAFF; } the styles like body#index#index_a_nav, are for an id which is inside the "a" tag and I think they are irrelevant. It assumes that each page has a different ID somewhere, either for the ul tag or the parent or wrap div so that my revised style like body#index li#index_nav a, only works where the parent has id="index", etc.
-
Help needed with a CSS menu
That would work if the ul style had a width, but it hasn't, and the parent div #modernbricksmenu2 has width: 100%, so I think you need to add a width to the ul style and then it will use the auto margin to center:- #modernbricksmenu2 ul{ margin:0 auto; width: 600px; background-color: skyblue; padding: 0; list-style: none; } The background-color is just temporary so that you can see where it is and how wide it is.
-
Address differences
www.something.com/page or www.something.com/page/ makes a browser go to the sub-directory called page but as the address doesn't give a filename it looks for a file called index.htm or index.html or index.php or index with any other extension (in that order, I think). If there is no file with index in the filename, the browser will display a list of all the files in that directory which can be a security issue if you don't want your files to be public, so most host servers have a Control Panel with a menu to disable indexing, so that if there is no index file, the browser says "forbidden". So each of your directories should have indexing disabled and you should have an index file like index.html in any directory where you expect people to enter a shortened version of the address like www.something.com/page (and the root directory should always have an index file so that if people just enter the domain name like www.something.com they will go to the index page). So if you haven't got a sub-directory called page, it must be the mod_rewrite.
-
Screen Resolution
Have a look at a tutorial like w3schools - the Learn HTML section http://www.w3schools.com/
-
Contact Pge
I haven't looked at your code yet, but a common program to use is Formmail http://www.formmail.com/ It sends data to an email address and claims to have security measures. Spambots and nuisance entries are a real problem with online forms. Here's another example http://www.wickham43.net/formemail.php which shows some typical code and the general PHP principles but it is just the basics and probably needs some extra security measures. Edit: I note that you use " instead of ' in you variables like $fulltname = $_POST["fullname"] ; I use just ' I have been told that it's incorrect to use " but I'm not sure.
-
Comment box thingy lol
A lot of people use Wordpress http://wordpress.org/ which can be styled to match other pages on your website. Here's an example (not produced by me) where the blog page uses Wordpress 2.7 (see source code) and it matches to other pages of the website. http://www.chalkevalleycricketclub.com/blog/ Is that the sort of thing you are looking for?
-
Contact Pge
Do you mean you want a contact form for someone to fill in and submit? To an email or to a database? Or just a page to show your contact details? Give us a little more to go on. Post a link to your page as it is or post the code.
-
Screen Resolution
it either comes out too large (where the viewer has to scroll to the left to view all the page) or two small where it can only just be read I think you may also be thinking of fluid design, not just centering. You've been given the codes to center the page in any screen resolution, but it will always have the same number of px in width so it will overflow a screen resolution of 800*600 px or have lots of space at the sides in a resolution of 1920*1200. Fluid design can be tricky, but essentially you make all widths of elements like images or divs or tables percentage widths and also for side margins and padding, so that they all add up to 100%. Unfortunately borders cannot be sized in % so if you have these you will have to allow a bit of space by making the % widths add up to 97% or 98%. It needs practice. If you don't state heights for images the height will adjust in proportion to the % width.
-
Hi i'm new and i have a problem (surely not?!?!)
Firefox, Opera and some other browsers don't show a dummy vertical scrollbar when there is only a little content on the page so you see the content jump when moving between pages (IE always does show a dummy). Two tricks to avoid this are:- html { height: 101%; } such a small amount it won't affect your page but Firefox and Opera will show a vertical scrollbar. or html { overflow-y: scroll; }
-
IE to be removed from Microsoft Operating system 7
My newspaper says that IE is to be removed from Microsoft operating system 7 in Europe (so perhaps it won't happen outside Europe). MS has been forced onto the defensive by European Regulators after a complaint by the Norwegian owners of Opera about the uncompetitive market for browsers. I remember that the same thing happened when Netscape complained in the early 1990s and Microsoft lost a court case but IE still remained in the OS; whether MS paid a fine I can't remember. Netscape found it very hard to survive. It seems that MS will offer computer manufacturers the choice of having IE pre-installed or not and most are still expected to have IE bundled in the OS. I think that people without IE on their computers will not be able to get automatic software updates from Microsoft although they will be able to download them individually with other browsers, which will be too much trouble for most computer users who won't know which to download, so I expect most people will still want IE pre-installed.
-
Two [2] quick questions
Let's say my index.php of my blog has a meta tag with another favicon.ico, will all my pages from my blog follow that meta tag's favicon.ico? The favicon.ico in the root directory has priority, but if you then add another, say image.ico , in the head section meta tag, that will show only on that page. AFAIK you have to add it on every page. The root directory icon must be called favicon.ico, but others can be anything with .ico extension. If you call the others favicon.ico they will have to be in a sub-directory but you may get confused if you call them all the same. http://www.wickham43...ts.php#favicons For the error.html thing, can I just "$echo"? It's up to what I want right? I use a separate html page for Error and Thank You, but you could just echo some text. Set a variable at the top of the PHP form $error="You have forgotten to enter in one or more boxes"; then in the IF or ELSE or ELSEIF position elseif (empty($email) || empty($name) || empty($subject) || empty($component) || empty($size)) { echo "<p>$error</p>"; } Depending on what the rest of your php code is, I don't know whether it just stops there with the error message or would continue with other ELSEIF; experiment.
-
How do i submit form and do thank you page
If you have mailto in the ACTION then it will open a viewer's mail client (if he has one, so it's no good with Hotmail, etc). You need an action to a PHP file which will email direct See item 1b here http://www.wickham43.net/formemail.php for general principles. It does work if you copy/paste and edit the admin email address and the form, but I'm not really suggesting that you use it; just use it as a guide. Security is a big problem with online forms and my code is just the basics and needs some extra security measures. The most important bit is at the end else { mail( $admin, "Feedback: $subject", "$name\n$message\n$component $size\n$delivery\n$confirmation", "From: $name <$email>" ); mail( $email, "Feedback: $subject", $replymsg , "From: $admin" ); header( "Location: $thankyouurl" ); } which emails admin (you) and sends an email to the person submitting the form with a reply message for his records and also pops up a Thank You page. Google for the same type of form. Good luck.
-
Two [2] quick questions
Re forms, you need to put in an elseif query like this (but it could be IF or ELSE or ELSEIF depending on how you have set up the processing):- // Code to check for empty input boxes elseif (empty($email) || empty($name) || empty($subject) || empty($component) || empty($size)) { header( "Location: $errorurl" ); } somewhere in the php processing which will bring up the error page in this:- $errorurl = 'error.html' ; // the URL to show on error - default error.html Same for max words but I haven't got that code right now. You would probably use this function str_word_count from http://uk.php.net/ma...-word-count.php and incorporate it in another else statement I confirm the last post that you must have a favicon called favicon.ico in the root directory, but individual pages can then have a head section tag for a different one which can be called anything provided it has the extension .ico
-
Translucent CSS Background
Opacity or filter can be difficult because it affects everything. If you have an element with opacity less than 100%, a div nested inside cannot return to 100% (no opacity) and this applies to text as well. Two options: 1. You can use a transparent gif as a background-image to the div (or a transparent png but they don't work in IE6 without special extra code), then the text will be normal. 2. You can have one div with the opacity and then use layers with absolute or relative positioning to layer another div over the top. As long as the second div is not nested within the first but layered over it, its opacity will not be reduced. See item 3c here:- http://www.wickham43.net/opacity.php
-
css layout issue
You're making things too complicated, you have too many styles. You have a #wrapper div 922px wide with margin: 0 auto so that it centers in any window resolution and inside is a #header div which floats left 890px wide, OK so far. Inside #header you have two p tags each with a class, one with red color text, both have left positions, float: left and position: fixed. All these combinations are unnecessary, especially as position: fixed doesn't work in IE6 and takes the code out of the normal flow of other code for the page so it will always be fixed from the window top left corner while other content may center in the viewport window, moving according to the window size. You don't need two p tags, just use one and use a span tag for the color that's different. Try these edits:- Add this to the CSS:- span { color: #ffffff; } Edit these CSS:- p.tel{ font-family: Tahoma, Arial, Sans-Serif; font-size: 14px; color:red; /*position:fixed;*/ /*float:left;*/ float: right; margin: 10px 10px 5px 0;/*was 10px 0px 5px 0px;*/ /*left:850px;*/ } which deletes position: fixed, changes float: left to float: right; deletes left and adds 10px to the margin to create a right margin (top, right, bottom, left). The whole p tag will now be shown 10px from the right side of #header, wherever that is on the screen. The class for p.telephone isn't necessary. Edit html markup:- <p class="tel">Tel: <span>01274 735666</span></p> <!--<p class="tel"> Tel: </p> <p class="telephone"> 01274 735666 </p> both p tags combined into one above--> There are always lots of ways to achieve the same result, but try to keep things simple.
-
ap div alignment problem
It's not line-height; it's different margins or padding that different browsers apply to some elements like p, ul, ol, h1 to h6, input and a few others. A neat trick is to temporarily add a background-color to a div to see the extent of it and how text or images fit inside it. Edit your style:- #apDiv2 { background-color: pink; position:absolute; width:200px; height:135px; z-index:1; top: 435px; text-align: left; font-family: Arial, Helvetica, sans-serif; font-size: 24px; line-height: 20px; left: 32px; font-weight: 400; color: ff7804; } which will show the difference in IE and Firefox. In Firefox there is space above "about" while in IE7 "about" is at the top of the div. then add this style:- p { margin: 10px 0; } which will make IE and Firefox the same. Many coders apply a general style p, h1, h2, h3, h4, h5, h6, ul, ol, li, input {margin: 0; padding: 0; } so that they start ecah page with browsers showing the same, then they add specific margin or padding to the divs, images, etc. where they want it.
-
TUTORIAL: how to center a site using css
Summarising how to center a page in the viewing window (viewport):- The first post on this topic said:- #wrapper { margin: 0 auto; width: xxxx; /* Replace the xxxx with the the width of your site (eg 800px)*/ text-align:left; } This is fine unless any elements inside the #wrapper are position: absolute as position: absolute elements are taken out of the normal flow and will take their top and left positions from the top left corner of the immediate parent, normally the body, so they remain fixed to the top left corner of the window. If you add position: relative to #wrapper, any position: absolute elements inside will then take top and left positions from the top left corner of the #wrapper so that if the #wrapper moves to center in any window resolution, the position: absolute elements will move with it, retaining their positions inside. A parent element without position: relative does not have this effect on position: absolute elements. So a safer code is:- #wrapper { margin: 0 auto; position: relative; width: xxxx; /* Replace the xxxx with the the width of your site (eg 770px)*/ text-align:left; } I would suggest 770px instead of 800px as an example so that there is space for a vertical scrollbar in older screen resolutions of 800*600px and it won't create a horizontal scrollbar. The other main method of centering a page is:- #wrapper { position: absolute; left: 50%; width: 770px; margin-left: -385px; } where the margin-left is always negative half the div width. This works well for small centralised divs like a small splash photo link but is unreliable for divs or images with a large width. It works well centering at higher window resolutions but at lower resolutions which are less wide than the div the negative margin-left takes the left edge out to the left beyond the screen edge. There is no way to scroll to reach the content beyond the left side.