PDA

View Full Version : I dont understand the CSS for this webpage



Countergod
Feb 26th, 2012, 04:45 AM
Hi guys,

I was perusing the web, trying to learn more about CSS, and I found this website:

http://www.singhapartments.com/p/apartments/furnished_apartments/northville-mi-48167/maincentre-4556?gclid=CPmkjO_buq4CFQff4AodvlTlPg

I opened the CSS for the page, and its enormous. I was wondering if someone could explain to me:

1) if all the code within the CSS is actually being used (i am suspecting not)
2) if this is the case, if someone could try to point me in the general direction of the CSS code that IS used?

Thanks!

DanInMa
Feb 26th, 2012, 05:10 AM
look like most of it's used, some is jsut predetemined for dynamic things, such as the shadowbox, which is probably some kind of modal or popup. Im not sure what you find confusing. Its not really that big, and its actually commented pretty thoroughly.

you can try using this to find out for sure: http://www.sitepoint.com/dustmeselectors/

it isnt compatible with my beta version of firefox.

Countergod
Feb 26th, 2012, 05:26 AM
Im pretty new to CSS, I stopped doing HTML programming about 10 years ago and now I'm trying to come back, learn HTML5 and CSS design. Its... different.

DanInMa
Feb 26th, 2012, 07:11 AM
start here - http://htmldog.com/guides/cssbeginner/ or look at the top of this forums for stickies full of links to start with :)

css is great, you jsut have to get down the basics and learn about things like the box model, and using floats properly, and css specificity ( thats a tough one sometimes)

also if youd like to point out some specific examples I or someone else could explain them for you

DanInMa
Feb 26th, 2012, 07:14 AM
here's a few to start with

p{
color:blue;
}

would make all <p> blocks have a text color of blue

you can apply this for pretty much any standard tag

.someclass{
rules here will apply to any element with a class of "someclass"
}

#someid{
this will target an element with an id of "someid"
}

a little more complex:

p.someclass {
this will only apply to <p> blocks with a class of .someclass
}


thoses are a few basics

Countergod
Feb 26th, 2012, 06:10 PM
Thanks, Ill start perusing them later today :)

Countergod
Feb 27th, 2012, 03:06 AM
One more question if i may:

How do you get it so that a certain <div> is always fixed at a certain part of the screen, no matter how you scroll up or down? I was told it was position: absolute in the CSS but this is not working here.

SB65
Feb 27th, 2012, 10:21 AM
One more question if i may:

How do you get it so that a certain <div> is always fixed at a certain part of the screen, no matter how you scroll up or down? I was told it was position: absolute in the CSS but this is not working here.

position:fixed is what you need.

urdumania.com
Feb 27th, 2012, 02:39 PM
ake a look at:



@font-face {

font-family: 'Gothamy';

src: local('Gotham Book'), local('Gotham-Book');

font-weight: normal;

font-style: normal;

font-variant: normal;



As I understand it, the CSS is calling Gotham if it is installed on the visitor's computer...I also understand that Gotham's license prohibits downloading from a web server...



What I don't under is what "Gothamy" refers to...I can't see a Gothamy font type...Anyone?

Countergod
Mar 2nd, 2012, 01:01 AM
I've never heard of a gothamy type either.

Thank you to those who helped!

Last question for anybody who still will put up with me xP

Is there a way to use CSS to fill in the entire content of a <div>? I am specifically looking to make a site wide navagation bar. As I remember the old Frames style for doing this, one frame would link directly to a separate navbar.html and I could edit this one html once and it would update the entire site. So far I have a navbar fixed on the left side (thanks SB65!) but I have to have the content in a <div> in each page, which has already made editing the navbar a total pain in the @$$.