A Conversation for Website Developer's Forum
CSS positioning
Santragenius V Started conversation Dec 11, 2002
I've got this design in a very initial phase -
http://www.lindevej.dk/capptest/
My problem is that the content boxes comes too far about as the top margin is set at 100 px to get the top one placed where it should be:
.content {
position:relative; /* Position is declared "relative" to gain control of stacking order (z-index). */
width:auto;
min-width:120px;
margin:100px 210px 0px 170px;
border:1px #CCCCCC solid;
background-color:transparent;
padding:5px;
z-index:3; /* This allows the content to overlap the right menu in narrow windows in good browsers. */
}
I've tried playing around with adjacent selectors as well as first-child - but can't for the life of me make the first one go at 100px and the following ones at eg 10...
But then, I'm very new at advanced CSS...
CSS positioning
Santragenius V Posted Dec 11, 2002
The individual text boxes in the wide middle column are too far apart for my liking... that is, from the 1st to the 2nd there are 100px and I'd rather have 20 or something like that
CSS positioning
Pastey Posted Dec 11, 2002
Do you mean between the bottom of one content box and the top of the next? Or between the link boxes and the content box?
CSS positioning
Santragenius V Posted Dec 11, 2002
Between the bottom of one content box and the top of the next - while keeping the distance between the first content box and the top of the window...
CSS positioning
Pastey Posted Dec 11, 2002
Ah, right. I see what you mean, and where the problem arises.
I *think*, and without testing it I can't be sure, but if you declare a seperate style within the first content box, it should override the parent style.
So, you'd have...
for the first one.
And change the content style to have...
margin:0px 210px 0px 170px;
I think.
CSS positioning
Santragenius V Posted Dec 11, 2002
Yeah, I always look at those 4 numbers and say "errrr - which one's left, top, ... etc)?
That's probably what I'll do - even though my brother-in-law (who's very hardcore in all this) would frown over the fact that I'm not properly separating content from layout...
Thx
CSS positioning
Pastey Posted Dec 11, 2002
I suppose to keep content seperate from layout you could always just create another class for the top content and assign that.
CSS positioning
DoctorMO (Keeper of the Computer, Guru, Community Artist) Posted Dec 11, 2002
Content specific Styles are as bad (and I think worse) then content that is styled.
better to introduce your class and do some modifiers with the style attribute,
-- DoctorMO --
CSS positioning
DoctorMO (Keeper of the Computer, Guru, Community Artist) Posted Dec 11, 2002
Looking good, even though it's in gobbly gook.
-- DoctorMO --
CSS positioning
Santragenius V Posted Dec 11, 2002
Now I'm just considering how to put in images without ruining the whole thing
(I've got ideas - put other things take presedence just now so it'll be a couple of days before it moves again, methinks)
Thanks for help & feedback
Key: Complain about this post
CSS positioning
- 1: Santragenius V (Dec 11, 2002)
- 2: Pastey (Dec 11, 2002)
- 3: Santragenius V (Dec 11, 2002)
- 4: Pastey (Dec 11, 2002)
- 5: Santragenius V (Dec 11, 2002)
- 6: Pastey (Dec 11, 2002)
- 7: Pastey (Dec 11, 2002)
- 8: Santragenius V (Dec 11, 2002)
- 9: C Hawke (Dec 11, 2002)
- 10: Pastey (Dec 11, 2002)
- 11: Santragenius V (Dec 11, 2002)
- 12: Pastey (Dec 11, 2002)
- 13: DoctorMO (Keeper of the Computer, Guru, Community Artist) (Dec 11, 2002)
- 14: Santragenius V (Dec 11, 2002)
- 15: DoctorMO (Keeper of the Computer, Guru, Community Artist) (Dec 11, 2002)
- 16: Santragenius V (Dec 11, 2002)
More Conversations for Website Developer's Forum
Write an Entry
"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."