Jump to content
Killersites Forums

Wickham

Advanced Member
  • Posts

    1,114
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Wickham

  1. Here is a FAQ I often get asked by beginners. Please comment so that we can arrive at an improved answer. Question:- I've got a site with 100 pages and I don't want to edit the menu on every page. Answer:- Form one page complete in the normal way with the menu and check that it validates and displays properly. Open up Notepad or a text editor (not Word) and cut the code that repeats in every page completely (as much or as little as you want, without doctype, html, head or body tags) and paste it into Notepad and save as an "include" file called menu.inc. You then have only one file to edit if the menu changes. Substitute the code you have cut out with PHP code <?php include ("menu.inc"); ?> in the main file and save it with .php filename extension instead of .html or .htm. Do the same with other main pages where the menu repeats. You can use .txt, .php, .html or .htm for the "include" file but it distinguishes it as an "include" file in your file list if you use .inc as the filename extension and it's even better if you put all "include" files in a different directory/folder. If you use a complete page as an "include" file with .html or .htm for the filename extension the final processed page will have two doctypes, two html tags, two head sections, etc. in an unusual place which is not a good idea. You can have different "include" files on the same main pages for header and footer and even use "includes" for the parts of the head section that repeat. The PHP code needs to be processed by a server before the result can be seen, either by the hosting service's server just before downloading or by a server like WAMP (which includes Apache) on your computer for local viewing. SHTML works the same way but the "include" file must have .txt filename extension and the main pages have the code and the .shtml filename extension. Check that your hosting service supports PHP or SHTML as free webspaces provided by ISPs usually do not.
  2. do i slice it up into too diffrent images or sperate images and intergrate them indivdualy for each one for menu buttons.... Lots of image slices, especially if structured in a table, are absolute hell to edit later and use an old method of coding. If you have the time, learn HTML and CSS and use divs. You should then be able to use a single large image as a background, or a few large background-images in a few divs, and code content text or images on top. It makes much simpler code. Having created a background for the whole page, you then create your menu as a horizontal or vertical list and can use separate images for each button or text on a background-image for each button. Buttons that are only images need a title attribute so that screen readers for blind people indicate which button is which. After reading your post again, what you might have is:- a body background-image for the whole page a header image in a header div or a header div with background-image and text headings a menu ul tag with a general background-image for the menu if required li tags for each button with text or background-images for each button (preferably with text) a content div a footer div
  3. Wickham

    Help with CSS

    It's the same in Firefox 3. Both links work with color change on hover even though one has a lower case/upper case mismatch but the #wrapper must be spelled with the same lower or upper case as the markup or the styles don't work. We both agree, though, that lower case is preferred, even for HTML.
  4. Well. I'm being a bit fussy; it's just that if a person with bad eyesight enlarges only the text in IE6 or IE7, the 10px .small class text will still be 10px, which could be difficult for them to see, but IE7 has a zoom so it's probably only IE6 which my comment applies to, and that's not got a huge share of the market now.
  5. It certainly is useful to have a starting point for a quick webpage, before you add detailed edits. In most places font is % or ems but in two places, pre and .small, it's in px. Could this cause the display to look a bit odd (edit: in IE which doesn't resize text when in px) when someone resizes text?
  6. Wickham

    Help with CSS

    I don't think you are right, but I may be corrected. It's a requirement of XHTML to use lower case, but I don't think XHTML fails with upper case, it just brings up validation errors. It's good practice to use lower case with HTML. Lower case and upper case are critical with filenames and urls, so that if the filename is File.HTML and the link has file.html most servers will fail to make the connection. Edit: You were almost right and so was I. With this code:- br /> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Test <br />#Wrapper { position: relative; background-color: blue; width: 500px; <br />height: 500px; }<br />#inner { position: absolute; left: 80px; bottom: 15px; background-color: <br />pink; width: 200px; height: 100px; }<br />A { color: green; }<br />A:hover { color: blue; }<br /> Inner div Inner div Inner div Test Test The links have correct colors in both links even though one has conflicting lower case while the style is upper case (using IE7). However, with the #wrapper it must be the same, either both lower case or both upper case, in the markup and style or the div background doesn't show, so the rule is that tags are OK if not the same but IDs must be the same (like filenames). The
  7. http://en.wikipedia.org/wiki/Display_resolution gives current % for various resolutions. A common method is to make the important information 780px wide and a sidebar to the right 220px wide with less important stuff like adverts or contact details, totalling 1000px, so that 800*600 users don't have to scroll to see the important content but 1024*768 users have a full window.
  8. At the moment the old forum shows 2488 Guests, 0 Member and 0 Invisible member while this forum shows 0 guests and 3 members. It makes me wonder who all the guests are who keep the old forum open! They obviously don't look at the page very much; the announcement about the forum move is in big letters.
  9. I can't think of an IE bug that would cause text to be a different color. If it affects the whole page, look carefully at the body style and then work down through the p tag styles, the h tag styles and containers checking for a style that overides a previous one or a spelling mistake. Sometimes one browser will guess what you want while another doesn't. Check that you have the # before the color code and ; afterwards. color: #eeeeee; Firefox has an add-on that shows all inherited styles for any part of your markup but I don't know the name of it.
  10. Wickham

    Background issue

    If that works, it's not the modern way of coding. i don't yet know ho to create multiple levels for different pages with CSS, or if thats even possible You create an id for each page:- #background1 { background-image: url(images/background1.jpg); } #background2 { background-image: url(images/background2.jpg); } and each page markup has:- ..........................or ..........................
  11. Can you give a link to the online page? Or at least paste all the styles here.
  12. That's strange; I tested the following in IE7 and Firefox and the pink div is near the bottom of the container as it should be in IE7. Iwould expect IE6 to be the same. br /> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Test <br />#wrapper { position: relative; background-color: blue; width: 500px; height: 500px; }<br />#inner { position: absolute; left: 80px; bottom: 15px; background-color: pink; width: 200px; height: 100px; }<br /> Inner div Inner div Inner div
  13. Position: absolute divs take positions from the corners of the screen unless the container they are inside has position: relative when they take position from the corners of the div or other element with position: relative. Usually top left positions but in your case bottom and left so try:- ................. and a new style (or add the style to your existing container) #container { position: relative; } Having said that, bottom positions can be difficult so we might need to see your whole code if it doesn't work.
  14. Merry Christmas from me too. Christmas dinner for my robin!
  15. @ dragdan - you've posted twice, see the other topic.
  16. Wickham

    Background issue

    Try this:- body { background-color: #FFFFFF; background-image: url(images/backround.jpg); background-repeat: no-repeat; background-position: right bottom; background-attachment: fixed; } where I've added url(..........) Is the image backround.jpg or background.jpg
  17. Wickham

    Background issue

    Neither page is resizing the image to the viewport resolution; if you make the window smaller, about 1000px wide, and drag it wider and narrower, the image will disappear out to the left and right in both pages. I don't think you can get a background-image to resize. It has a fixed size and you can set options to fix it to the center so that both sides get cut off in a small window, or set it to the left so that only the right side gets cut off. One image is 1600px wide and the other 1230px wide, so you may be seeing some different centralising in different windows, but not resizing. The background-position property is described here:- http://www.w3schools.com/css/pr_background-position.asp If you want the image to resize in any viewport resolution, see this example http://www.wickham43.net/backgroundfullwidthflexible.html drag the window wider and narrower and see that the sides are fixed to the window edges and the width and height adjust according to the window size. The example uses a normal image, not a background-image, which is positioned with position: fixed and other content shows on top because of z-index: -1; and the image stays fixed when scrolling. Edit: since your images have a central section for content, you will have to use a flexible or percentage width for the content so that resizes as well. It could be complicated. IE6 does not operate position: fixed so position: absolute has to be used, so the image scolls up and down with the content in IE6 although it does adjust to the viewport width in the same way.
  18. I agree with Stef and Thelma about the signatures, but would you consider a place in the personal profile for people to add something about themselves or about their computer or whatever? At present the only information you can add is your name and your website and some people may not have a website to show their personal data.
  19. IE7 is now letting me log in with cookies blocked but session cookies allowed. I think I understand now what was happening. Yesterday and this morning I was having trouble logging into the test forum with IE7 with cookies blocked but session cookies allowed; I got the message " You appear to have logged in successfully, however a cookie has not been set. Please check your settings and if applicable, enable cookies for this website" and if I changed to "accept cookies" it was OK. Today with the new forum I'm not getting the problem with cookies, but killersites.com is in my trusted sites while killerblogs.com is not. In IE7 I normally have ActiveX disabled so it seems that although the message was about cookies, it may have been the ActiveX setting that was causing the trouble. I tend to keep ActiveX disabled in IE7 but javascript enabled in FF so that I can test without or with ActiveX/javascript quickly and some ActiveX/javascript effects annoy me, so I use IE7 for pages where I think that will happen.
  20. I mentioned on the test forum that IE7 with cookies blocked and session cookies allowed does not allow a log in; a message comes up saying that you appear to be logged in but need to enable cookies. You can't do anything which requires to be logged in until you enable cookies and log in again. No big deal because there is an explanation of the problem. The old forum did not have this problem. I thought I would test IE8 beta 2 but this does allow a log in with cookies blocked and session cookies allowed. Firefox allows a log in but the options are different - accept cookies "until I close Firefox". I also wanted to see if IE8 had any problems because it is still causing many people trouble but I can only see one minor one at the moment; Where it says "Write message" next to the post input box the red message "(Required)" is over the top of "Write message".
  21. Thanks Stef, I'm sure this forum will be as successful than the last one, probably more so.
×
×
  • Create New...