473,398 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Element Align Problem - Negative margins, images etc.

ilya Kraft
134 100+
Hello,

I'm trying to make a header that goes outside the borders of my sidebar and has a shadow image that makes it look like it is a book-mark.

Something similar to this: Image Here

Right now I tried my best, but it is not looking correct. here is my code for sidebar and header That I think should work to make this effect, but it isn't.

HTML

Expand|Select|Wrap|Line Numbers
  1. <!-- Sidebar -->
  2. <aside id="sidebar">
  3.  
  4.    <!-- header div -->
  5.    <div id="sideProfile">
  6.  
  7.       <!-- Span with image background -->
  8.       <span id="sideHshadow"></span>
  9.  
  10.    </div>
  11.  
  12. </aside>
  13.  
  14.  
CSS

Expand|Select|Wrap|Line Numbers
  1. #sidebar {
  2.         padding: 15px;
  3.         width: 400px;
  4. }
  5.  
  6. /*Span with shadow image to make it look like a bookmark */
  7. #SideHshadow {
  8.     height: 6px;
  9.     width: 12px;
  10.     margin: 0 0 -6px 0;
  11.     float: right;
  12.     background: url("../images/sidebar_header_shadow.png") no-repeat;
  13. }
  14.  
  15. #sideProfile {
  16.     background:#333333;
  17.     border-bottom: 1px solid #2d2d2d;
  18.     height: 50px;
  19.     width: 400px;
  20.     margin: 0 -12px 0 0;
  21.  
  22.     box-shadow: 0 1px 2px #77bee6;
  23.     -moz-box-shadow: 0 1px 2px #77bee6;
  24.     -webkit-box-shadow: 0 1px 2px #77bee6;
  25.  
  26.     -webkit-border-radius: 7px 7px 0 7px;
  27.     -khtml-border-radius: 7px 7px 0 7px;
  28.     -moz-border-radius: 7px 7px 0 7px;
  29.     border-radius: 7px 7px 0 7px;
  30.  
  31.  
  32. }
  33.  
Attached Images
File Type: png img2.png (10.2 KB, 160 views)
Aug 27 '11 #1
0 1284

Sign in to post your reply or Sign up for a free account.

Similar topics

27
by: Thomas Mlynarczyk | last post by:
Hello, I noticed that IE seems to put some kind of default margins on <li> elements and the only way to get rid of them seems to be asigning negative margins. To make things worse, IE5 and IE6...
16
by: Woodmon | last post by:
I want to flow text in an "irregular" column on the left and place a large image at the top of an "irregular" column to the right. Then after the bottom of the large image I want the text column on...
0
by: BACON | last post by:
I'm just starting the process of reorganising my modest little website and cleaning up all the HTML, and the logical place to begin was with the homepage. I made a simple little ASP.NET control...
5
by: BACON | last post by:
I'm just starting the process of reorganising my modest little website and cleaning up all the HTML, and the logical place to begin was with the homepage. I made a simple little ASP.NET control...
0
by: Kevin Smith | last post by:
I have a need to align the baseline of some text with the baseline of text within an image as in the following snippet. <html> <body> Inside table, image is cropped. <table border="1"><tr><td>...
19
by: waste | last post by:
hello there. i am asking for a little help with creating layout like this: 13px 500px 13px...
3
by: Patient Guy | last post by:
For a long time, this page has been up and an embarrassment. http://tinyurl.com/ylcqum In Firefox, the table moves out of its parent container with the negative margin, but not in MSIE6. ...
3
by: torbs | last post by:
Strange behaviour in ie7. A collegue of mine put several images into a page using JCE in Joomla. JCE have the option to align these images and he left aligned every single one - to create a...
5
by: elsigh | last post by:
http://www.commoner.com/lsimon/horzscroll_rtl.html My question is if anyone knows of a way to get an element to expand across the entire viewport in IE in RTL without setting the body padding or...
4
by: asedt | last post by:
Hi If you use negative margins to center a page page and if the screen is small the content get hidden outside the screen(window) at the left side and you cant scroll to it. Is it a common...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.