Basic CSS question
Page 1 of 114 Replies - 5310 Views - Last Post: 22 March 2011 - 09:10 PM
#1
Basic CSS question
Posted 05 October 2009 - 11:50 AM
body {font-family:Verdana, Helvetica, sans-serif; margin:0px; background:repeat-y, white, body.jpg}
Replies To: Basic CSS question
#2
Re: Basic CSS question
Posted 05 October 2009 - 11:59 AM
The correct way to have that code is like so:
body {
font-family:Verdana, Helvetica, sans-serif;
margin:0px;
background: url(body.jpg) repeat-y white;
}
Now, that has spacing to make is easier to read, but you could do it all on one line by just removing the line breaks I added.
Hope that helps.
#3
Re: Basic CSS question
Posted 05 October 2009 - 01:10 PM
you don't HAVE to do it like this :
p {
color:red;
}
you CAN do it the way you want, but when you go back to reading it, it is much easyer to read
Infact ... there's an artical about this somewhere ... lemme fish it out
http://net.tutsplus....-for-beginners/
Number one on the list
bam
#4
Re: Basic CSS question
Posted 05 October 2009 - 03:55 PM
Display the address only when both margins are clear of floating elements.
#5
Re: Basic CSS question
Posted 05 October 2009 - 04:00 PM
Display the address only when both margins are clear of floating elements.
#6
Re: Basic CSS question
Posted 05 October 2009 - 04:01 PM
#7
Re: Basic CSS question
Posted 08 October 2009 - 11:08 PM
Display the address only when both margins are clear of floating elements.
I can't really find the relevant information in my text. Any help?
#8
Re: Basic CSS question
Posted 09 October 2009 - 07:20 AM
Basically, you don't want the address tag to have anything floating left or right of it, that means that you should clear the sides first. I suggest checking out these sites for more information on what CSS can do:
www.w3schools.com
www.tizag.com
#9 Guest_gemini*
Re: Basic CSS question
Posted 26 February 2010 - 10:40 PM
thehollow89, on 08 October 2009 - 10:08 PM, said:
Display the address only when both margins are clear of floating elements.
I can't really find the relevant information in my text. Any help?
I am having the same problem... I can't figure out how to "Display the address only when both margins are clear of floating elements."
here is my code
#address {text-align: center; font-style: normal; font-size: 10pt; background-color: white; padding: 10px; border-style: solid; border-size: 1px; border-color: black; clear: both}
#10 Guest_Jason45*
Re: Basic CSS question
Posted 16 April 2010 - 09:13 AM
#11 Guest_Madz*
Re: Basic CSS question
Posted 03 May 2010 - 02:17 PM
gemini, on 26 February 2010 - 09:40 PM, said:
thehollow89, on 08 October 2009 - 10:08 PM, said:
Display the address only when both margins are clear of floating elements.
I can't really find the relevant information in my text. Any help?
I am having the same problem... I can't figure out how to "Display the address only when both margins are clear of floating elements."
here is my code
#address {text-align: center; font-style: normal; font-size: 10pt; background-color: white; padding: 10px; border-style: solid; border-size: 1px; border-color: black; clear: both}
I tried your code and without the '#' and it worked (finally) for me.
#12 Guest_Madz*
Re: Basic CSS question
Posted 03 May 2010 - 02:25 PM
#address {text-align: center; font-style: normal; font-size: 10pt; background-color: white; padding: 10px; border-style: solid;
border-size: 1px; border-color: black; clear: both}
[/quote]
This is what I changed:
address {text-align: center; font-size: 10pt; font-style: normal; background-color: white; padding: 10px; border: 1px; border-style: solid; border-color: black; clear: both}
#13 Guest_madz*
Re: Basic CSS question
Posted 03 May 2010 - 02:27 PM
this is what i have
address {text-align: center; font-size: 10pt; font-style: normal; background-color: white; padding: 10px; border: 1px; border-style: solid; border-color: black; clear: both}
#14
Re: Basic CSS question
Posted 03 May 2010 - 03:09 PM
Also instead of
border: 1px; border-style: solid; border-color: black;
you can just do
border: 1px solid black;
It's a lot quicker, it also works on all things that have 4 sides, like padding, margin, borders etc.
so
margin:10px 5px 6px 8px;
And the order is Top, Right, Bottom then Left.
Finally.
.address is for a class called address
and #address would be for an ID - You should only have 1 ID with the same name, but you can have multiple classes with the same name for different IDs.
and just reference them by
#anID .someClass {}
#AnotherID .someClass {}
This post has been edited by revolutionx: 03 May 2010 - 03:11 PM
#15
Re: Basic CSS question
Posted 22 March 2011 - 09:10 PM
The answer to your question:
I am having the same problem... I can't figure out how to "Display the address only when both margins are clear of floating elements."
is....
clear: both
|
|

New Topic/Question
Reply



MultiQuote




|