How to define form only styling?
Hi there, this is my first post so i apologise if I write something incorrect.
On my site, nettlessolar.com I have a home page as well as other pages. The form on home page is causing me some problems. I can't define any colours or how it looks without it screwing with the normal CSS of the page. I was told i should use <div id="formdiv"> </div> I am having problems, because even though i am trying to implement it, I can't change any colors on the form. Either nothing happens, or it interferes with the main page. I'll post the code, sorry i don't know if i'm allowed to or not. I'll only post part, as you can view the source at the site. <!-- beginning of email form --> <div id="formdiv"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> body { #formdiv font-family: Arial, Helvetica, sans-serif; font-size: 12px; } .box { #formdiv font-family: Arial, Helvetica, sans-serif; This is how i am trying it, and then at the end of the form i have a </div> Can anybody please help me here? Cheers (would using an #INclude solve any of these problems??) Back to top |
|||||
My suggestion is that you read up a bit on CSS, and html, before trying to do something reasonably complex.
CSS is not that easy, and your sample code shows you have pretty much no idea how to do it. I don't say that to be rude, just to point out a fact: :: Code :: body {
#formdiv font-family: Arial, Helvetica, sans-serif; font-size: 12px; } Is not a possible css construct, you need to start with the css basics, try alistapart.com for starters, or just google css tutorials. CSS has syntax rules like any other programming type language, and you can't get anywhere if you don't learn them. Here, for example, you place a CSS id INSIDE the css statement, that can't happen, it is what the rule applies to, not the rule itself. eg: :: Code :: #formdiv {
font-family: Arial, Helvetica, sans-serif; font-size: 12px; } would be a correct syntax. But you have to study css to understand how it works. CSS stands for Cascading Style Sheets, and if you don't understand the basics of that cascade, you can't get css to work at all, and even if something sort of works by luck, it will break again because it was random. There's a lot of good css tutorials on the web, and also it's a very good idea to download a site's css stylesheet (I recommend against this site's because they are too complicated for new users to really understand), look at how the rules are written, and learn. That's how we all do it when we start, it takes work. Good luck Back to top |
|||||
All times are GMT - 8 Hours
|