Newbie duplicate css reference question
-
I am new and learn by borrowing from others. I am taking over for someone. He has two css files. One of them has this:
#main-content {
position: relative;
top: 0px;
left: 0px;
width: 95%;
}
and the other has this:
#main-content {
position: relative;
top: 0px;
left: 200px;
width: 80%;
}How do you know which is the current command?
thanks
LeeThe blog I need help with is: (visible only to logged in users)
-
Hi there,
It is the order in which the stylesheet is loaded which will decide the style applied.
Eg.You have the following code in style.css
#main-content { position: relative; top: 0px; left: 0px; width: 95%; }And there is another stylesheet style1.css with the code
#main-content { position: relative; top: 0px; left: 200px; width: 80%; }Now it depends which CSS file is loaded at the last.
If style1.css is loaded last, then the #main-content in style1.css will overwrite the #main-content in style.cssTo check the order in which the files are loaded (Chrome browser)
1. Open the website
2. Click the View tab in the menu. Go to Developer and then View Source
3. Search for your style files. Whichever comes later will have its rules apply. -
Hi Lee,
leewghctest3.wordpress.com is currently using the Free plan but custom CSS is only supported on the Premium or Business plans. If this isn’t the site you are working on, please me send me a link and I can point you in the right direction for getting some help.
Thanks!
- The topic ‘Newbie duplicate css reference question’ is closed to new replies.