CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 5th, 2013, 09:27 PM
smartyx99 smartyx99 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2013
Posts: 1 smartyx99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 m 57 sec
Reputation Power: 0
New Member - CSS not working...

Hi,

I am new to this form and new to web development. I have written the following code for including social buttons in footer in my web page:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Footer</title>
<link rel="stylesheet" type="text/css" media="all" href="css/socialfooter.css" />
</head>
<body>
<div id="divblock_2" style="float: right;">
<h3>Connect and Share</h3>
<div id="divsocial_box">
<div id="divfacebook"><a href="#"title="Facebook"></a></div>
<div id="divtwitter"><a href="#" title="Twitter"></a></div>
<div id="divlinkedin"><a href="#" title="Linkedin"></a></div>
<div id="divyoutube"><a href="#" title="Youtube"></a></div>
</div>
</body>

</html>

Following is the CSS for the above:
@charset "utf-8";

body, h1, h2, h3, h4, h5, h6, p, div, ul, li {

margin:0;
padding:0;
}

body {
font-family: Verdana, Geneva, sans-serif;
background-color: white;
height: 600px;

}


#divblock_2 {
float: left;
padding: 0 0 0 0px;
width: 227px;
}

#divsocial_box {
float:left;
width:100%;
padding-bottom:20px;
background:blue;
}

#divfacebook, #divtwitter, #divlinkedin, #divyoutube {
float:left;
margin-right:7px;
}

#divfacebook a {
background:url("images/facebook.png") no-repeat 0 0px;
width:43px;
height:44px;
display:block;
-moz-transition:all 0s ease 0s;
-webkit-transition:all 0s ease 0s;
transition: all 0s ease 0s;
-ms-transition:all 0s ease 0s;
}

#divfacebook a:hover {
-moz-transform: rotate(-360deg);
-moz-transition: all 0.8s ease-in-out 0s;
-webkit-transform: rotate(-360deg); -webkit-transition: all 0.8s ease-in-out 0s;
-ms-transform: rotate(-360deg); -ms-transition:all 0.8s ease-in-out 0s;
transform: rotate(-360deg); transition: all 0.8s ease-in-out 0s;
}


#divyoutube a {
background:url("images/youtube.png") no-repeat 0 0px;
width:43px;
height:44px;
display:block;
-moz-transition:all 0s ease 0s;
-webkit-transition:all 0s ease 0s;
}

#divyoutube a:hover {
-moz-transform: rotate(-360deg);
-moz-transition: all 0.8s ease-in-out 0s;
-webkit-transform: rotate(-360deg);
-webkit-transition: all 0.8s ease-in-out 0s;
}

#divtwitter a {
background:url("images/twitter.png") no-repeat 0 0px;
width:43px;
height:44px;
display:block;
-moz-transition:all 0s ease 0s;
-webkit-transition:all 0s ease 0s;
}

#divtwitter a:hover {
-moz-transform: rotate(-360deg);
-moz-transition: all 0.8s ease-in-out 0s;
-webkit-transform: rotate(-360deg);
-webkit-transition: all 0.8s ease-in-out 0s;
}

#divlinkedin a {
background:url(images/linkedin.png) no-repeat 0 0px;
width:43px;
height:44px;
display:block;
-moz-transition:all 0s ease 0s;
-webkit-transition:all 0s ease 0s;
}

#divlinkedin a:hover {
-moz-transform: rotate(-360deg);
-moz-transition: all 0.8s ease-in-out 0s;
-webkit-transform: rotate(-360deg);
-webkit-transition: all 0.8s ease-in-out 0s;
}


-------------------------------------------------
I have placed the images in images folder, but still can't get it work. I can see the "Connect and Share" line.
Please help me improve this code.

Reply With Quote
  #2  
Old January 5th, 2013, 10:59 PM
DonR DonR is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 494 DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)  Folding Points: 29722 Folding Title: Starter FolderFolding Points: 29722 Folding Title: Starter Folder
Time spent in forums: 2 Weeks 2 Days 19 h 55 m 31 sec
Reputation Power: 216
#1) you are missing a closing div
#2) your images need to be referenced [in the css file] from wherever your CSS file is located.
if you have something like:

./index.html
./css/socialfooter.css
./images/<yourimages>.jpg

then, your reference will be url("../images/<your image>.jpg") ... because you must first ascend up and out of the css folder to get into the images folder.

Reply With Quote
  #3  
Old January 7th, 2013, 01:10 AM
Edith Abbott Edith Abbott is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 3 Edith Abbott User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 m 53 sec
Reputation Power: 0
Quote:
Originally Posted by DonR
#1) you are missing a closing div
#2) your images need to be referenced [in the css file] from wherever your CSS file is located.
if you have something like:

./index.html
./css/socialfooter.css
./images/<yourimages>.jpg

then, your reference will be url("../images/<your image>.jpg") ... because you must first ascend up and out of the css folder to get into the images folder.


I agree with DonR to found out your mistake. firstly close div tag. update you file again then try.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > New Member - CSS not working...

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap