Flash Games

 FAQ   Search   Members   Groups   Register  User Control Panel      Login 

Your time now:
Mon Nov 23, 2009 4:34 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 8 posts ]  Bookmark and Share
Author Message
 Post subject: DIV Tags
PostPosted: Thu Aug 09, 2007 2:38 pm 
Offline

Joined: Thu Aug 09, 2007 1:00 am
Posts: 23
Hi all

I am kind of new to CSS. I have used DIV tags to contain a piece of text and an image extracted from a database (mysql). In the CSS I have defined the position as absolute for the DIV tags, however the height of the DIV section expands and contracts with the size of its content.

Is there way I can fix the length and the width of the div section?

Regards

explorer


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 10, 2007 3:29 am 
Offline
50+ Club

Joined: Wed Jun 20, 2007 1:51 am
Posts: 91
Location: Australia
you need to define the height and width of the div tags with
Code:
width="100%" height="100%"
for a percentage of the whole page or
Code:
width="100" height="100"
for exact pixels...

_________________
I put everything down to this: EWIT (Everything Works In Theory)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 10, 2007 7:44 am 
Offline
100+ Club
User avatar

Joined: Fri Jul 27, 2007 11:41 am
Posts: 136
Location: 4170: Brisbane
Don't do it that way.
Always define it in the DIVs CSS.
unless you're using generic DIV tags, then use the above.

_________________
Keep Your Dicks In Your Pants, Scumbags.
---

http://www.myspace.com/upug
http://www.myspace.com/keepyourdistancemag (under construction)
http://www.last.fm/user/knifeinback


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 10, 2007 11:06 am 
Offline
50+ Club

Joined: Wed Jun 20, 2007 1:51 am
Posts: 91
Location: Australia
*re-looks over his initial response and hits head against a wall* lol god when I stuff up i do it royally lol sorry pay n\o heed to my ramblings lol :P

_________________
I put everything down to this: EWIT (Everything Works In Theory)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 10, 2007 2:39 pm 
Offline

Joined: Thu Aug 09, 2007 1:00 am
Posts: 23
Thanks dragon, I understood your first reposne I will try that. But I did not understand your recent post.

As for knifeback I think he was suggesting that I should have my DIV tags in the CSS file. Well I may do that eventually.

I really like this technology but I want to start using XML too.

Regards

Explorer


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 11, 2007 11:32 am 
Offline
100+ Club
User avatar

Joined: Fri Jul 27, 2007 11:41 am
Posts: 136
Location: 4170: Brisbane
Well, as a person who uses DIVs for everything (i fkn hate tables and all that, haha) I'll offer some advice.

I put all my general CSS (body etc) in a external file.
Then, I put all the CSS for the pages DIVs in the head tag of the page.

For some reason I find this easier if the DIVs tend to need the same postions (mainly) and maybe a few alterations from page to page, just copy, paste and change.

If all your DIVs are going to be the same for each page.
Just put them in the external file.

-----

If you're not actualy naming DIVs, and using the geric DIV tag.
Don't bother with css for DIV. Just use something like:

<div height="XXpx" width="XXpx"></div>

and so on.
hope that helps

-----

Also, for XML. www.w3schools.com will teach you what you need to know.
But considering your posts main topic, I think you mean XHTML.

_________________
Keep Your Dicks In Your Pants, Scumbags.
---

http://www.myspace.com/upug
http://www.myspace.com/keepyourdistancemag (under construction)
http://www.last.fm/user/knifeinback


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 11, 2007 3:18 pm 
Offline

Joined: Thu Aug 09, 2007 1:00 am
Posts: 23
Well Knifeback, I prefer to put all my CSS in an external file. I usually have two, one for layout and the other for everything else. I dont like using the CSS on the page header, the embedded method. In fact I even prefer the inline method.

I also like DIVs rather than tables.

But do you know if I can restrict the number of words in my DIV tag which contains a piece of text that it is reading from the database. Basically I am reading four records into the DIV section and I want to assign them equal space inside the DIV tag.

No I meant XML and not XHTML. XML is far more versatile as it allows you to define the tags and I am looking at exchanging data between applications. But at this statge I will remain with CSS instead of XSTL.

Regards

Explorer


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 12, 2007 7:48 am 
Offline
100+ Club
User avatar

Joined: Fri Jul 27, 2007 11:41 am
Posts: 136
Location: 4170: Brisbane
Haha, Head CSS is hell easier if you have to change from page to page. Imo anyway.

I can't help there, sorry.

_________________
Keep Your Dicks In Your Pants, Scumbags.
---

http://www.myspace.com/upug
http://www.myspace.com/keepyourdistancemag (under construction)
http://www.last.fm/user/knifeinback


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group - Flash Games - TNX Invitation Code - TNX Review


Webmaster - Excruciating - Johnathan - Kotik - Ash - Tomi - rangana - Phate - dflynn - Medley