Div Tag Not Working

June 22nd, 2008

When you’ve completed your x/html page which is using CSS div tags/classes, you may have a tag or class that doesn’t appear to be functioning properly. Maybe an image isn’t centred, maybe it doesn’t have a border, or maybe the font is not bold - Basically whatever elements you added to that rule are not displaying properly. So what to do?
Firstly, take a sanity check. Has the last set of rules been completed? Do they all have semi-colons at the end and a closing curly bracket? Look at this example:
#div1{
element: option;
element: option
element: option;

#div2{
element: option;
element: option;
element: option;
}
Div1 element two is missing the closing semi-colon. Also the div does not have a curly bracket ( } ) so div2 won’t function on your page. To fix this you need the semi-colon and the closing bracket so it will look like this:
#div1{
element: option;
element: option;
element: option;
}

#div2{
element: option;
element: option;
element: option;
}
Pretty basic stuff. So whats wrong with this following example?
#1stdivbox{
element: option;
element: option;
element: option;
}

#div2{
element: option;
element: option;
element: option;
}
Semi-colons and curly brackets are both present so all should be good. Actually, you can’t start a div tag with a number. Basically its seen as a dimension and therefore doesn’t function.
In CSS1, an id name could start with a digit (”#55ft”), unless it was a dimension (”#55in”). In CSS2, such ids are parsed as unknown dimensions (to allow for future additions of new units) To make “.1stdiv” a valid id, CSS2 requires the first digit to be escaped (”#\31stdiv”) - W3C Explaining why starting a tag with a number may not work how you want it to.
If you’ve done these quick sanity checks and its not working run it through the W3C CSS validator and see what errors come out. Its always best to use validated xhtml and css as it will cause less problems and helps ease cross browser compatibility. It will also help with parent/child issues which can get quite complicated. Keep your CSS simple and logical. Good luck!

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Success With Linux

June 15th, 2008

PC Linux OSI’ve been a Windows user since the dawn of time but have recently had the urge for a new direction in computing. Switching to a Mac is a bit on the expensive side and I still have plenty of software I need to use on my Windows computers. After a bit of research I found Linux to be an option. On the plus side you can use a “Live CD” to try out Linux without harming your computer. It loads everything off the CD and doesn’t touch your drives. This is excellent to see if Linux is for you. You can also partition your drive so you can keep Windows and switch between the two whenever you want. The biggest pro for Linux is the price. Its free and so are the thousands of pieces of top software that’s included in the operating system (imagine if Windows included 5500 pieces of top quality software!). You simply go to an add/remove programs type facility and pick and choose what you want.
The cons are slightly frightening. When things go wrong as a Linux nooby, they go really really wrong. Partitioning drives can lead to total data loss at a click of a mouse, drivers for things like Wifi, simply don’t work, and using the terminal to run commands can be extremely daunting. I’ve been trying to get a usable version of Linux over the past six months and this is what I did.
After looking in to Linux I decided to go for the most popular distribution package with a great community and good support. Arguably, this is Ubuntu. There forums have thousands of active members posting helpful posts to get everything up and running. Installation was a breeze and everything was looking great. Logging in for the first time though I found that my usb Wifi dongle was not recognised by Ubuntu. After looking in the forums (and switching back and forth between Windows and Linux!) I found I had to compile a driver and install it using the terminal. Despite following numerous tutorials I never did get connected using Ubuntu, so I left Linux finding it just too much hard work for nothing.
It was then a couple of months later I got hold of a distribution of PCLinixOS. I used it as a live CD and felt it was a good package so I went ahead and installed it on to my drive. PCLinixOS use the phrase “Radically Simple” as their slogan and installation really was that. Nice and easy. When I booted up for the first time and tried to connect to my wifi network, imagine my surprise when it all fired up first time. No drivers to configure, even my usb was working great.
PCLinuxOS is similar to Windows in its desktop environment so Windows users will feel right at home. There really isn’t much of a learning curve and there is a great community of users on the web.
Its definitely fair to say that I am no master of Linux. I’m still very, very new to Linux but this is the best package out there for Linux noobys. Try it out and tell us what you think.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...