|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Adding some boxes through div's and css
Hi all,
I found a cool css template on the web and have implemented it on one of my pages. I am fairly adept (I thought ) at css design, but I cannot seem to ADD 2 more boxes, one each below the boxes already in place on the page. Can anyone help me out? Thanks!Page is here Chris
__________________
Pop, pop, fizz, fizz, oh what a relief it is! |
|
#2
|
||||
|
||||
|
I've tried additional div's, span's, etc to no avail. I'll try some tables next, but I would rather continue to use css. Any ideas? Thanks!
Chris |
|
#3
|
||||
|
||||
|
So you want to create two more id's in the CSS, #navdelta and #navgamma?
You would have to use absolute positioning, but then you would have to know exactly how much space the first two boxes are taking up. I don't think you could use relative positioning, because the div's wouldn't be relative to anything but the main content div. |
|
#4
|
||||
|
||||
|
So you want to create two more id's in the CSS, #navdelta and #navgamma?
Yeah, exactly! The trouble is that I already tried that and got nothing at all. It's weird. Quote:
Well, the two boxes that are there already are positioned absolutely. Thw two new ones I tried to add were also absolutely positioned, but like I said, when I added them, I got nothing at all. Chris |
|
#5
|
||||
|
||||
|
Worked for me, dude. Did you verify that your new div's have the new ID's, since I assume you did a copy-paste of some code?
|
|
#6
|
||||
|
||||
|
CSS looks like this:
Code:
#navGamma {
position: absolute;
top: 400px;
left: 20px;
background-color: #f5f5f5;
padding: 10px;
z-index: 2;
text-align: center;
voice-family: "\"}\"";
voice-family: inherit;
height: 295px;
border-style: inset;
border-width: thick;
}
|
|
#7
|
||||
|
||||
|
HTML looks like this:
Code:
<div id="navGamma"> <h1>Links</h1> <p>etc...
__________________
Hello, old friend... |
|
#8
|
||||
|
||||
|
That could be it, bro.
Quote:
I like to THINK I'm not that dumb , but I'll check! Thanks!Chris |
|
#9
|
||||
|
||||
|
Here are a couple of tries achieving what you want.
demo1 demo2 I used floats, which can be tricky. As usual, MSIE is a PoS and screws up the clear:both attribute. That will likely not be an insurmountable problem. Just use a good browser like Moz to see how the demos should look. Read the excellant articles at /*pie*/ for a clear description of floats and their care and feeding. cheers, gary
__________________
There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing. Ask a better question, get a better answer. |
|
#10
|
||||
|
||||
|
khwang...
I got it. What you said worked. That's EXACTLY what I had been doing all along, with ONE stupid exception on my part. I left "top" in the css as 20px, so both of my new div's were simply overlapping the 2 original ones! Oops! Thanks, man! Chris |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > Adding some boxes through div's and css |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|