/    Sign up×
Community /Pin to ProfileBookmark

shadow effect border mis-aligned!

Hello,

I followed a tutorial to add the shadow effect to the body of my website:

[url]http://www.webdesignerforum.co.uk/index.php?showtopic=307[/url]

However, when I finished, the shadow effects are too close together behind my main body and I would like to know how to align them properly so that they run right along downside the main body of the web page…

[url]http://joomla.rojasfam.com[/url] Here you can see what I mean.

[code]/* CSS Document */

html {
height : 100%;
margin-bottom : 1px;
}

body {
 background-image: url(../images/vd_background.jpg); /** Link to the image you created **/
 background-repeat: repeat-y; /** Repeats the image vertically **/
 background-position: center; /** Centers the Background image **/
 background-color: #f7f4ee; /** Website BG colour (matches canvas colour in Step 1) **/
}

a:link, a:visited {
color: #1543d8;
font-weight: normal;
text-decoration: none;
}

a:hover {
color: #46c;
text-decoration: underline;
}

h1 {
font-weight: normal;
font-size: 18px;
color: #000;
}

h2 {
font-weight: normal;
font-size: 16px;
color: #333;
}

td, p, div, span {
font-family: Tahoma, Helvetica, sans-serif;
font-size: 12px;
color: #333;
line-height: 130%;
text-align: left;
}

h3, .componentheading {
color: #333;
font-weight: normal;
font-size: 18px;
text-align: left;
font-family: Helvetica, Arial, sans-serif;
padding: 4px 0;
margin: 10px 0;
border-bottom: 1px solid #ccc;
}

.componentheading {
padding: 0;

}

.contentheading {
height: 35px;
vertical-align: bottom;
padding: 0;
margin: 0;
font-size: 13px;
font-family: Helvetica, Arial, sans-serif;
color: #333;
font-weight: bold;
}

.buttonheading {
vertical-align: bottom;
}

.sectiontableheader {
font-weight: bold;
border-bottom: 1px solid #ccc;
}

table.contenttoc {
margin-left: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
padding: 5px;
}

span.small, td.createdate {
font-size: 11px;
font-weight: normal;
color: #999;
}

a.mainlevel {
display: block;
background: url(../images/vd_menu_bullet.png) 0 -3px no-repeat;
padding-left: 20px;
height: 20px;
}

div.clr {
clear: both;
}

div#center {
height: 100%;
text-align: center;
}

div#wrapper {
height: 100%;
margin-left: auto;
margin-right: auto;
min-width: 750px;
max-width: 1050px;
width: expression(document.body.clientWidth > 1050? “1050px”: “auto” );

}

div#whitebg {
margin: 0 15px;
background: #fff;
}

div#header {
background: #000 url(../images/vd_header.jpg) 0 0 no-repeat;
margin: 1px 0px;

}

div#header_frog {
height: 165px;
background: url(../images/vd_bible.jpg) 100% 0 no-repeat;
}

span.header {
display: block;
line-height: 90%;
vertical-align: bottom;
padding-left: 30px;
padding-top: 80px;
font-family: Times New Roman, Times, serif;
font-size: 36px;
color: #fff;
}
span.subhead {
font-family: Times New Roman, Times, serif;
font-size: 12px;
color: #CFEDC8;
padding-left: 30px;
}

div#padding {
padding-bottom: 14px;
}

div#horizsep {
height:1px;
overflow: hidden;
background: #ccc;
margin-top: 15px;
margin-bottom: 15px;
}

div#divider {
border: 1px solid #fff;
background: url(../images/vd_vert_sep.png) repeat-y;
background-position: 25% 0 !important;
background-position: 26% 0;
}

div.thinsep {
clear: both;
margin-top: 15px;
height: 5px;
overflow: hidden;
background: #000 url(../images/vd_header.jpg) 0 0 no-repeat;
}

div#footer {
clear: both;

margin-top: 15px;
padding: 5px 0;
text-align: center;
color: #999;
font-size: 10px;
}

div#main {
margin-left: 25%;

float: none;
width: auto !important;
width: 100%;
}

div#main_padding {
padding: 0 15px;
float: none;
width: auto !important;
width: 100%;
}

div#sidebar {
float: left;
width: 25%;
}

div#sidebar_padding {
padding: 0 15px;
float: none;
width: auto !important;
width: 100%;
}

/* horizmenu */
div#horizmenu {
white-space: nowrap;
margin: 10px 0px;
line-height: 20px;
height: 20px;
margin-right: 5px;
padding-left: 15px;
}

div#horizmenu ul {
margin: 0;
padding: 0;
list-style:none;
}

div#horizmenu li {
float: right;
background: url(../images/vd_vert_sep.png) 0 0 no-repeat;
margin: 0;
padding: 0;
}

div#horizmenu ul#mainlevel-nav a {
float:left;
display:block;
height: 20px;
line-height: 20px;
text-decoration: none;
padding: 0 15px;
}

div#horizmenu a:hover {
}

div#horizmenu a.active_menu {
color: #000;
}

span.pathway {
float: left;
line-height: 20px;
}

[/code]

Thanks!

ShireStudios

to post a comment
CSS

6 Comments(s)

Copy linkTweet thisAlerts:
@CentauriApr 11.2008 — That tutorial is only suitable for fixed width sites, but yours is a fluid width, therefore a different tack is required. You will need to have the left and right shadows on separate nested wrappers, and fortunately, two such elements are already present without changing the html - #center and #wrapper. First, remove the background stuff from the body (except the colour), and set a zero margin here to get rid of the gap at the top. Next, transfer the width and margin settings from #wrapper to #center, so that #center now becomes the div controlling the site width. Then apply your background image as a background to [B]both[/B] of these elements, but with one positioned to the left and one to the right :
[CODE]body {
background-color: #f7f4ee;
margin: 0;
}

div#center {
height: 100%;
margin: 0 auto;
min-width: 750px;
max-width: 1050px;
width: expression(document.body.clientWidth > 1050? "1050px": "auto" );
text-align: center;
background: url(../images/vd_background.jpg) left top repeat-y;
}

div#wrapper {
height: 100%;
background: url(../images/vd_background.jpg) right top repeat-y;
}[/CODE]


As only a small part of the total width of the graphic is being used, you could narrow the graphic down considerably (by taking 500px or so out of the middle of it) which will reduce graphic size and reduce the possibility of the two instances of the graphic overlapping each other.
Copy linkTweet thisAlerts:
@shirestudiosauthorApr 11.2008 — thanks so much!

I'll check this out tomorrow after work!

-ShireStudios
Copy linkTweet thisAlerts:
@shirestudiosauthorApr 11.2008 — Ok, so I tried it now anyway...

YOU ROCK!!!!

Thanks. I am new to CSS, so I'll have many q's in the future!

-ShireStudios
Copy linkTweet thisAlerts:
@shirestudiosauthorApr 11.2008 — I do have one other Question in regards to this....

The main body of my site is white...

If I want to insert a watermark/background in place or on top of the white, what do I need to do..

PLEASE NOTE: I am using joomla, so are there any special tricks?

Thanks again!

S.S.
Copy linkTweet thisAlerts:
@WebJoelApr 11.2008 — It should be pointed out that...
body {

[B] [/B]background-image: url(../images/vd_background.jpg); /** Link to the image you created **/

[B] [/B]background-repeat: repeat-y; /** Repeats the image vertically **/

[B] [/B]background-position: center; /** Centers the Background image **/

[B] [/B]background-color: #f7f4ee; /** Website BG colour (matches canvas colour in Step 1) **/

}[/quote]
is HTML, depicted here in a CSS declaration. "[B]non-breaking spaces[/B]" cannot be used this way and will throw an error.
Copy linkTweet thisAlerts:
@CentauriApr 12.2008 — If I want to insert a watermark/background in place or on top of the white, what do I need to do..[/QUOTE]

That is just a matter of setting a background-image for the #whitebg div.

Also note that just above the css for #whitebg n the css file, you still have extra css for #center and #wrapper - get rid of those.

Also, remove the xml prologue (the [COLOR="Blue"]<?xml version="1.0" encoding="utf-8"?>[/COLOR] ) from the start of the page - this is throwing IE into quirks mode.
×

Success!

Help @shirestudios spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...