Reply
Please help me (CSS)
Old 04-21-2007, 10:46 PM Please help me (CSS)
Junior Talker

Posts: 3
Name: Adriana
I am creating a website for a a photographer and this is my first time using layers and CSS.
The page I created looks perfect in Internet Explore, but on firefox, everything is shifted all over.

Could someone help me fix my CSS so that it looks the same in all browsers?

Thank you so much in advance!

Here is the link
http://northshoreclassifieds.com/test6/family/home.html
salabinha is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 04-21-2007, 11:13 PM Re: Please help me (CSS)
Extreme Talker

Posts: 184
You don't need to assign both id and class like id="main" class="main"
You should check css documents for more information.
Code:
To align your main content:
#mainbody{
width: 765px;
margin-left: auto;
margin-right: auto;
}

for the menu:
#top {
    height: 46px; 
    width: 765px;
    background-color: #222222;
    text-align: right;
}

For bloc1, you set a too low height
 #bloc1 {
    height: 425px; 
    width: 765px; 
    background-image: url(img/graybg.jpg);
    background-repeat: repeat-x;
}
Your site looks perfect in IE7 because it ignores all the errors you made, not because it's any better than FireFox *_*

Last edited by yellow1912 : 04-21-2007 at 11:15 PM.
yellow1912 is offline
Reply With Quote
View Public Profile Visit yellow1912's homepage!
 
Old 04-22-2007, 12:28 AM Re: Please help me (CSS)
Junior Talker

Posts: 3
Name: Adriana
Thank you for your reply. I changed my CSS and it worked! Thank you so much.
My question now is about the Div and id tags. When I remove the id name from the HTML section for each layer, things changed and it does not look the same.

Could you please give me some more information about this?

Thank you again!
salabinha is offline
Reply With Quote
View Public Profile
 
Old 04-22-2007, 03:41 AM Re: Please help me (CSS)
Average Talker

Posts: 25
Name: Ben Allen
Firstly, I suggest you learn more on CSS at somewhere like http://www.w3schools.com/css/default.asp.

Basically, In CSS you can apply rules using "#ID" or ".class" or "elementtag". #ID will apply to the element with that ID (since ID's should be unique), .class will apply the rules to all elements with that class and just specifying the element tag will apply the rule to all elements with that tag (e.g. a{} would apply to all a tags (links)).

Since the rules for most of your page is specified using #, you are targeting the ID, hence when you remove the ID things no longer look correct, instead, the class is the unnessary part.

Generally use ids when something is unique, class to things that will be repeated.

Hope that helps.
ballen is offline
Reply With Quote
View Public Profile
 
Old 04-22-2007, 03:54 PM Re: Please help me (CSS)
LadynRed's Avatar
Super Moderator

Posts: 6,539
Location: Tennessee
You can, of course, add classes to an ID, it's not forbidden and it can be effective when needed.

A word of advice - don't START with IE and then look at the site with Firefox or Opera. IE6 and below is soooo buggy that if it looks "right" in IE, about half the time it will be wrong in the more standards-compliant browsers.

You've got a serious case of div-itis on that page. A better method for your menu is NOT a batch of divs - use an unordered list.
http://css.maxdesign.com.au/listutorial/index.htm


IF you're going to use floats, you must also CLEAR the floats.
http://css-discuss.incutio.com/?page=ClearingSpace
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Please help me (CSS)
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13562 seconds with 12 queries