Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Integrating Css Code In Webpage


15 replies to this topic

#11 Baniboy

    Advocatus Diaboli

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 878 posts
  • Gender:Male
  • Location:/root
  • Interests:Everything...
  • myCENT:37.47

Posted 08 February 2011 - 03:00 PM

I see nothing wrong when I try your code out in Opera and Firefox. Height is automatically auto, you don't have to define it again, so I'd remove that from the code, IE/Windows Live Mail could be freaking out because of this. You have also written "float: center;". The float property can only handle 'none', 'left', 'right' and 'inherit' values. Inherit makes it inherit the value from its parent element. So get rid of that too because it causes a syntax error.

Overall we end up with this:
<DIV style="PADDING-BOTTOM: 30px; MARGIN-TOP: 50px; PADDING-LEFT: 30px; WIDTH: 650px; PADDING-RIGHT: 30px; BACKGROUND: #d4ffd4; MARGIN-LEFT: auto; MARGIN-RIGHT: auto; PADDING-TOP: 30px; -moz-border-radius: 30px; -webkit-border-radius: 30px">
Also, I see you use the XHTML syntax. Unlike in HTML, in XHTML we only use lowercase letters for the tags. You can use them for element attributes tho. (Attribute examples: alt="..", title="...", href="...."). Browsers shouldn't in any normal circumstances be annoyed by the uppercase tags tho, I've only seen the W3C validator whine about them. Speaking of attributes, there are attribute selectors in CSS that allow you to select an element based on what attributes it has and what are the values of them.
You might also want to group your inline (or any other type of) styling so that is easier to read, for example all paddings, margins sizes etc in their own groups.

Quote

But, in the mean time, thank you ever so much for the help you have already given me.
I have really learned a lot.

No problem. Glad I could help. It's knowledgesutra after all. If nobody helped anyone, it would be spamsutra.

And yeah, for a moment I actually thought that MS was trying to make a good browser. After saying to myself it would suck, I felt like racist or something (what would you call me... a browcist?), because I was bashing it with no reason. Well, by what I hear from people I was right. Browcism ftw.

#12 mrdee

    Privileged Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 810 posts
  • Gender:Male
  • Location:Slough (UK)
  • myCENT:90.63

Posted 09 February 2011 - 01:22 AM

Well,
maybe I caused a bit of browscism for nothing maybe.

In my HTML editor (Coffeecup), when you make a new page, you have a choice of which opening tag (hope that's the right term) you can use, there is a whole list, such as HTML5 (<Doctype html>), html 4.01 transitional, html 4.01 strict, xhtml 1.o transitional (default), SVG, MathML, HTML+MathML etc. etc., the list goes on and on.

I noticed that, when I used the wrong DOCTYPE (that's the right word), things did not display properly in IE9.

Of course, with the HTML standards changing, and some browsers supporting it better than others, and given the fact that the Doctype makes a difference too, it is still somewhat confusing to me, and I need to do quite a bit of experimenting.

I also noticed that, sometimes the browsers shows a certain feature, only to magically stop showing it without making any changes ti the code, then to appear again like it should be.

That is what confused me about the "float" function, as, sometimes, it did actually centre my box.
So, should I just use <div align="center></div> then?

Oh, and finally, looking at your signature, are you a musician?
If you are, we might even have much more to discuss here.

Anyway, thanks again for all your help so far.

#13 Baniboy

    Advocatus Diaboli

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 878 posts
  • Gender:Male
  • Location:/root
  • Interests:Everything...
  • myCENT:37.47

Posted 11 February 2011 - 11:21 PM

Yea it sucks with the gray areas in markup and styling when it comes to browsers. Sometimes you just don't know what the output is going to be.

Quote

That is what confused me about the "float" function, as, sometimes, it did actually centre my box.
So, should I just use <div align="center></div> then?

Oh, and finally, looking at your signature, are you a musician?
If you are, we might even have much more to discuss here.

If you have "margin-right: auto;" and "margin-left: auto;" the browser should automatically center the box element.

I play drums in a band and a little bit of piano.

#14 mrdee

    Privileged Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 810 posts
  • Gender:Male
  • Location:Slough (UK)
  • myCENT:90.63

Posted 12 February 2011 - 12:03 PM

That last sentence sounds quite interesting to me.

At the risk of going off-topic:

Do you play any particular style?
I am always interested in talking to a fellow musician, I am a professional musician who has worked all over Western Europe.
I was classically trained (in my day you had no choice), with the organ as main instrument, but then I started playing popular music and got an interest in jazz too.

After playing on my own (as an organist) for years, I then started putting my groups together, I used to have a Dixieland group (I played piano in that, and when we did street parades I played trombone or bass tuba) and I also had my jazz trio (piano, bass, drums) and jazz quartet (trio with addition of sax, trumpet or vocals).

In the last 12 years or so, I have not performed that much, as I have been doing more work in music education (teaching privately, teaching in secondary schools and colleges).

I must say I sometimes miss going on the road, but none of us get any younger. :blink:

I would love it, though, if I could find something like doing a cocktail lounge job in a hotel (some cool, easy-listening stuff), or get a Dixieland Band up and running again.
That is why I am organising auditions now, and if I find suitable people, I might well get started again.

Another ambition I have, though, is one in education: since I have taught at almost all levels, I would very much like to end up lecturing at university, but you have to be very lucky to work your way in there, it is often a case of "It is not what you know, but WHO you know".

But, anyway, let me know what kind of music you play, what you are interested in, and what you want to achieve with music.
We might have some interesting talks about that. Who knows what it might lead to, and, we might be able to post some interesting topics on here.

#15 Baniboy

    Advocatus Diaboli

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 878 posts
  • Gender:Male
  • Location:/root
  • Interests:Everything...
  • myCENT:37.47

Posted 12 February 2011 - 02:28 PM

I started a new thread about the topic, since it doesn't seem appropriate continue code discussion with a music discussion looking at the rules around here. :D Click

#16 mrdee

    Privileged Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 810 posts
  • Gender:Male
  • Location:Slough (UK)
  • myCENT:90.63

Posted 12 February 2011 - 02:40 PM

Sure, that is what I mentioned in the last post in the thread.
Hopefully rhey will not hold it aginst me for this time.




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users