css layout
- Bizarro
-
Bizarro
- Member since: Dec. 6, 2002
- Offline.
-
- Forum Stats
- Member
- Level 22
- Blank Slate
At 11/2/06 02:39 PM, Loccie wrote:At 11/2/06 07:28 AM, Jessii wrote:Thanks but most of them don't seem to do anything and float: right; moves the text about 5px to the right but that's all. Look at the link to see what it does with the text: "eeee...". There must be a small error or something in the code but everything works just a minor glitch in IE that will be fixed asap. (I hope)
text-align: left; text-align: right; float: left; float: right;
Play with those and see which one works to get what you want.
if it has moved to the right, then it should be right aligned, the reason there isn't a drastic change is because your text of "e" takes up almost the entire width of the div. Also while looking at your code I saw that you are centering each and every single div you have. This is not necessary as I have told you before, all you need to do is put a containing div around all your other ones, and center that one. This will get rid of a lot of redundant code in your css. Also your use of z-index, as far as I can tell is unnecessary.
- Loccie
-
Loccie
- Member since: Feb. 27, 2004
- Offline.
-
- Forum Stats
- Member
- Level 16
- Blank Slate
At 11/2/06 02:58 PM, Bizarro wrote:
if it has moved to the right, then it should be right aligned, the reason there isn't a drastic :change is because your text of "e" takes up almost the entire width of the div.
I see, thanks. The only thing that does not work yet it centering the text. As you can see I tried text-align: center; but no success. Any Ideas, should I use the left: 50%; left-margin: -x;, or can I not do that?
:Also while looking at your code I saw that you are centering each and every single div you :have. This is not necessary as I have told you before, all you need to do is put a containing div :around all your other ones, and center that one. This will get rid of a lot of redundant code in :your css.
I know but it works so I think I'll leave it like this unless it causes errors what it is not doing a.t.m. I think.
:Also your use of z-index, as far as I can tell is unnecessary.
It's required so the menu shows above the layout. (I am making move-overs you see :-) )
- Bizarro
-
Bizarro
- Member since: Dec. 6, 2002
- Offline.
-
- Forum Stats
- Member
- Level 22
- Blank Slate
At 11/2/06 03:41 PM, Loccie wrote: I see, thanks. The only thing that does not work yet it centering the text. As you can see I tried text-align: center; but no success. Any Ideas, should I use the left: 50%; left-margin: -x;, or can I not do that?
Text align center should work for text with no problems, again since what you are trying to center may take up the full width, you may not see much of a difference
I know but it works so I think I'll leave it like this unless it causes errors what it is not doing a.t.m. I think.
Tables also worked, but you switched from them because CSS is the correct way to do things, so I suggest you consider that when you say "but it works"
It's required so the menu shows above the layout. (I am making move-overs you see :-) )
Then you should only need 2 levels of z-index, a lower one for everything below the menus and then an upper one for the menus. You dont really need the 7 that you have
- Loccie
-
Loccie
- Member since: Feb. 27, 2004
- Offline.
-
- Forum Stats
- Member
- Level 16
- Blank Slate
At 11/2/06 07:01 PM, Bizarro wrote: Text align center should work for text with no problems, again since what you are trying to center may take up the full width, you may not see much of a difference
Look at the code I am trying to center a test somewhere but no test is centered on the screen.
Tables also worked, but you switched from them because CSS is the correct way to do things, so I suggest you consider that when you say "but it works"
I see your point. I redid a lot of the code and now it works even better with way less coding.
Then you should only need 2 levels of z-index, a lower one for everything below the menus and then an upper one for the menus. You dont really need the 7 that you have
Ah okay I though you may only use 1 number for each layer.
Also I ran my css through the W3 validator and I got this result:
It says it is valid css but it shows some warnings but I have no idea what to do with them. Example:
Line : 29 (Level : 1) You have no background-color with your color : a:link
I don't want a background color for my link so how can I put one?
- bob
-
bob
- Member since: Aug. 29, 2003
- Offline.
-
- Forum Stats
- Member
- Level 17
- Blank Slate
At 11/3/06 08:41 AM, Loccie wrote:
Also I ran my css through the W3 validator and I got this result:
result
It says it is valid css but it shows some warnings but I have no idea what to do with them. Example:
Line : 29 (Level : 1) You have no background-color with your color : a:link
I don't want a background color for my link so how can I put one?
You shouldn't worry about your css validating just yet. It's the XHTML that you should get right, and nail the style later. Content is key, everything else is just gravy.
- Loccie
-
Loccie
- Member since: Feb. 27, 2004
- Offline.
-
- Forum Stats
- Member
- Level 16
- Blank Slate
At 11/3/06 10:21 AM, bob wrote: You shouldn't worry about your css validating just yet. It's the XHTML that you should get right, and nail the style later. Content is key, everything else is just gravy.
The XHTML is valid I am just re-doing my layout so it is W3 valid so I want a valid css.
- Jessii
-
Jessii
- Member since: Feb. 10, 2005
- Offline.
-
- Forum Stats
- Member
- Level 36
- Movie Buff
At 11/3/06 01:51 PM, Loccie wrote: The XHTML is valid I am just re-doing my layout so it is W3 valid so I want a valid css.
Valid css is ok but it's not anything majorly important as Bob said.
- Jordan
-
Jordan
- Member since: Apr. 23, 2006
- Offline.
-
- Forum Stats
- Member
- Level 14
- Blank Slate
Why make your site xhtml valid if you aren't going to be using the xhtml mime type for it?
And I'd recommend you didn't.
- bob
-
bob
- Member since: Aug. 29, 2003
- Offline.
-
- Forum Stats
- Member
- Level 17
- Blank Slate
I took a look at your site and while it technically does validate, it's not very semantic. You should code the basic content first, then go back and add the style later. If you remove the style sheet and look at your code, you shouldn't have as many images as you do now and it should still be 99% functional. Right now, your pull-down menus are more form than function...


