Use the border property to create a visual divider. li { border-top: 1px solid black; padding: .3em 0; } Then apply a border to the bottom of the ul element to create the bottom border ul { margin-left: 40px; padding-left:
How to colour your web page scrollbars
Changing the scrollbar properties are not part of the W3C standard, but some browsers support them. Use the following CSS settings: Scrollbar-face-color Scrollbar-shadow-color Scrollbar-highlight-color Scrollbar-3dlight-color Scrollbar-darkshadow-color Scrollbar-track-color Scrollbar-arrow-color You can use these settings for the main window scrollbar, textareas, framesets,
Stop people stealing my web page images
Stopping people stealing your images Use a single pixel transparent GIF as a place marker then wrap a div element around the img tag. alt=””> Then bring the image into the web page by using the background-property and making sure
How can I place a drop shadow effect behind an image
Place the image element inside a div element with the class attribute set to imgholder Set the alignment to the left so that text wraps around the image. Now set the background image of the drop shadow in two background
Skipping navigation and skip to content
Place the following at the top of your html page: Skip to content This way a screen reader will jump reading all your navigation and will just skip this and read your main content. It’s also important to hide this
How to change the background colour of a text field in a form
If you want to change the colour of the field the user has the cursor in, then use the following CSS: Input:focus, textarea:focus { background: #eee }
How to add a border to every cell in a table
td { border: 1px solid black } table { border-collapse: collapse } This will involve border collapsing, which will push the cells together which will leave only the wider of the two adjacent borders visible.
Remove padding from CSS lists
By default most lists have padding to the left, internet explorer will apply a margin and other browsers will add padding. So to get rid of this, add this: ul { padding: 0; margin: 0; }
Replace your logo image with a hidden H1 tag
There are several ways to accomplish this, such as: Company Name h1 span { display:block; height:0; overflow:hidden; } There is another way without using span tags Company Name h1 { background-image: url(images/logo.gif); width:300px; height:129px; font-size:1px; text-indent: -999em; } The problem
How can I get a popup link to work if the user has javascript switched off
Just set the value of the href attribute to the page used in the pop-up and the javascript used to launch the pop-up window should return false. This way if a user does not have javascript enabled or does not
