CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
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 December 20th, 2003, 01:13 PM
orbitup orbitup is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 17 orbitup User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
CSS: total control over positioning of boxes

hello all,

I've been teaching myself webpage design and ive decided to not use tables. my problem that i have encountered is that when i introduce a new box, it automatically gets put just to the right of the last one i introduced.

http://members.rogers.com/mkurowski/mathtest.html

ive changed the background to white so it's clear where all the boxes are.

say i wanted to have that big box "Welcom to..." directly beneth the funky doddle that is to the left of it right now. How would I do this without using a whole bunch of <br>'s?

Thanks, Matt

Reply With Quote
  #2  
Old December 20th, 2003, 01:23 PM
Webnet Webnet is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 266 Webnet User rank is Corporal (100 - 500 Reputation Level)Webnet User rank is Corporal (100 - 500 Reputation Level)Webnet User rank is Corporal (100 - 500 Reputation Level)Webnet User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 33 m 38 sec
Reputation Power: 7
Send a message via AIM to Webnet
You're retarded not to use tables....

Reply With Quote
  #3  
Old December 20th, 2003, 01:26 PM
orbitup orbitup is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 17 orbitup User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i just want to learn this CSS properly. i know its doable cause ive seen pages doing it.

Reply With Quote
  #4  
Old December 20th, 2003, 01:34 PM
Webnet Webnet is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 266 Webnet User rank is Corporal (100 - 500 Reputation Level)Webnet User rank is Corporal (100 - 500 Reputation Level)Webnet User rank is Corporal (100 - 500 Reputation Level)Webnet User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 33 m 38 sec
Reputation Power: 7
Send a message via AIM to Webnet
yeah... it's also stupid. There's no logical reason for using divs over tables, except that it's harder, and you can't do as with it.

Reply With Quote
  #5  
Old December 20th, 2003, 01:37 PM
orbitup orbitup is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 17 orbitup User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
dude, im not posting a question about if its better to use tables. I simply want to know how to do this in CSS, i know its harder. I can do tables, I'm learning new things. If you dont know, then dont reply.

Reply With Quote
  #6  
Old December 20th, 2003, 01:52 PM
lisajill lisajill is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 152 lisajill User rank is Private First Class (20 - 50 Reputation Level)lisajill User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via ICQ to lisajill Send a message via AIM to lisajill Send a message via Yahoo to lisajill
Well,

I'll start by saying your page looks completely different in Mozilla than in IE. I'm betting Mozilla is more "right" - that is, closer to standards.

I'm not that great with CSS, most of what I've done is by finding what I want then adapting it.. to that end, while it's not particularly useful to you probably, why not go to a page that has a display of what you want and look a their style sheet? Use that as a basis to learn. Obviously don't steal their stuff, but theres nothing wrong with learning by example.

That said: there are many logical reasons for using css over tables; I won't get into that argument here, because that guy is simply trolling; but I think that it is a huge advantage for you to stick to it and learn (as you seem to be) and you'll find that it's worth it =)

Just remember, tables aren't all evil and they do have a proper place.

I had an idea, I'm not that great with CSS but when I had an alignment issue that wasn't clearing properly, I found that inserting this code

Code:
<br style="clear: both;" />


helped to clear the alignment and let me move 'downwards' rather than 'sideways'. but, then again, in Mozilla it does move downwards, already. I can attach a screenshot if you'd like, let me know.
__________________
Lisa
distant, early morning

Reply With Quote
  #7  
Old December 20th, 2003, 02:04 PM
orbitup orbitup is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 17 orbitup User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thank you lisajill, that one line does work. do you know what "both" refers to by chance?
And as for the modzilla deal, I guess youre saying that I need to make some additional code so that the boxes do display side by side? kind of like an <br style="clear: both;" /> evquivalent to keeping in on the side? a screen shot would be greatly appreciated.

Matt

Reply With Quote
  #8  
Old December 20th, 2003, 02:04 PM
Winters Winters is offline
Bad Coder
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jul 2003
Posts: 1,744 Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 12 h 3 m 32 sec
Reputation Power: 171
Webnet, if you aren't going to add anything useful to the thread, don't add anything at all.

orbitup, welcome to CSS and positioning. There are many, many ways to deal with positioning elements on your page. Not all are good.

Sometimes you will find that it is useful to mix tables with positioned boxes.

CSS positioning can be further enhanced with Javascript. For example: Using javascript to work out the available space that the page has to work with on users browsers and then positioning accordingly.

Reply With Quote
  #9  
Old December 20th, 2003, 02:10 PM
orbitup orbitup is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 17 orbitup User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PHP: ya, i havnt quite got around to javascript just yet, but its on the to do list:P do you know a good page that discribes all the different sorts of postioning type deals with all that absolute and relative etc. jiznat?
thanks, matt

Reply With Quote
  #10  
Old December 20th, 2003, 02:16 PM
lisajill lisajill is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 152 lisajill User rank is Private First Class (20 - 50 Reputation Level)lisajill User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via ICQ to lisajill Send a message via AIM to lisajill Send a message via Yahoo to lisajill
Here is the Mozilla Screenshot.. my next reply will be the IE screenshot... as it shows on my pc's, just so you know for sure=)
Attached Images
File Type: gif mathtest-moz.gif (79.2 KB, 147 views)

Reply With Quote
  #11  
Old December 20th, 2003, 02:18 PM
lisajill lisajill is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 152 lisajill User rank is Private First Class (20 - 50 Reputation Level)lisajill User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via ICQ to lisajill Send a message via AIM to lisajill Send a message via Yahoo to lisajill
IE screenshot

the mozilla versions are mozilla 1.5 and mozilla firebird .7... if you're interest, opera renders it the same as the mozilla's =)
Attached Images
File Type: gif mathtest-ie.gif (85.4 KB, 118 views)

Reply With Quote
  #12  
Old December 20th, 2003, 02:22 PM
orbitup orbitup is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 17 orbitup User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
oh boy, ya thats a little bit of a disturbed modzilla pg...
seems like it should have a simple solution...any ideas?:S time to go interent huntin ... thanks a lot for the help

Reply With Quote
  #13  
Old December 20th, 2003, 04:23 PM
Akh's Avatar
Akh Akh is offline
|<.+#f@#+.&.|
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2002
Location: norway
Posts: 2,622 Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 6 Days 2 h 20 m 44 sec
Reputation Power: 548
css files can not have html tags in them so remove them

don't skip directly to a h3 tag,
use h1 as highest level title and skip the pre-tags arround the title use css to do the spacing between the letters

Code:
css:
h1	{
	color: #990000;
	font-size:1em;
	letter-spacing:0.5em;
	}
html
<h1>MATHSEED EXPEDITIONS TUTORING</h1>


for some reason you have put ! infront of many ot the float,
remove the !. and it will begin to look a bit more normal in mozilla.

you can remove float form the mainbox.
and set a margin to the left, have also increased the width of the titlebox.


Code:
css:
.mainbox	{
	padding: 4px;
	margin: 1px 1px 1px 200px;
	background: #666;
	border: 1px solid #ccc;
	margin-bottom: 0mm;
	width: 300px; 
}

.titlebox	{
	float:left;
	padding:  2px;
	margin:  0px;
	width: 190px;
	background: black !#666;
	border: 0px solid #ccc;
	}

html:
	<div class="mainbox">
	<h2>Welcome to Mathseed Tutoring Expeditions</h2>

	<h3>All in one:</h3>
	<ul>
		<li> math tutor</li>
		<li> kayak guide</li>
		<li> ski instructor</li>
		<li> camp counselor	</li>
		<li> environmental engineer</li>
	</ul>
	</div>



you have used the id font2 and bodyText more than once, id are unique for a documents and can only be used once, change it to class.

Last edited by Akh : December 20th, 2003 at 04:25 PM.

Reply With Quote
  #14  
Old December 20th, 2003, 05:52 PM
orbitup orbitup is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 17 orbitup User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Talking

Akh: thank you. the 2 things you said about start with h1 and and id can only be once... are those actual rules or just a good standard to follow? i mean i have noticed that wheather i call something a class or an id, it works the same...is is just that i havnt tried something where that actually matters or is it simply just "good programming standard"? m@

Reply With Quote
  #15  
Old December 20th, 2003, 06:37 PM
Akh's Avatar
Akh Akh is offline
|<.+#f@#+.&.|
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2002
Location: norway
Posts: 2,622 Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 6 Days 2 h 20 m 44 sec
Reputation Power: 548
the id is unique
http://www.w3.org/TR/1998/REC-html4...al.html#h-7.5.2


h1 tags can be used more than once, but should be avoided,
but if you skip directly to a h3 tag you are breaking the structur of the document.
read more of it here:
http://www.w3.org/TR/1998/REC-html4...al.html#edef-H1
http://www.camaban.co.uk/semanticwhat.php
http://www.webaim.org/techniques/structure/

Reply With Quote