Could i put all this info in a css file and still code

<div id="submenu1"> </div>

if yes how?

#submenu1 {
	position:absolute;
	top:530px;
	left:167px;
	width:auto;
}
#submenu2 {
	float:right;
	position:absolute;
	padding-left:10px;
	border-left:thin;
	border-left-color:#000;
	border-left-style:solid;
	border-left-width:thin;
	top:530px;
	left:487px;
	width:auto;
}
#submenuline {
	position:absolute;
	width:525px;
	top:535px;
	left:167px;

Dani AI

Generated

Good move by to pull style rules out of the HTML. Keep the stylesheet in the document head so the browser loads it once and keeps markup clean:

<link rel="stylesheet" href="styles.css">

Organize the CSS file for maintainability: group layout rules, typography, and component styles into sections. Prefer reusable classes over many unique IDs for similar elements; IDs are fine for truly unique pieces but make reuse awkward. Adopt a simple naming convention (for example BEM-like names) so future changes are predictable.

Avoid relying on fixed absolute coordinates for menu layout unless the design is strictly pixel-fixed. Absolute positioning removes elements from the normal flow and breaks easily on different screen sizes and font zoom. Modern layout modules solve this: a small flexbox row will keep submenu items aligned and responsive without hard-coded left/top values.

.submenu-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

Practical tips: use shorthand border declarations to reduce repetition; width:auto is the default and can usually be omitted; ensure any absolutely positioned child sits inside an ancestor with position:relative to control its origin. Test layout changes with browser devtools, add media queries for smaller viewports, and minify/cache the final stylesheet for production. These steps keep markup simple and make future maintenance much easier.

I figure it out, I just could type

#submenu1 {
	position:absolute;
	top:530px;
	left:167px;
	width:auto;
}
#submenu2 {
	float:right;
	position:absolute;
	padding-left:10px;
	border-left:thin;
	border-left-color:#000;
	border-left-style:solid;
	border-left-width:thin;
	top:530px;
	left:487px;
	width:auto;
}
#submenuline {
	position:absolute;
	width:525px;
	top:535px;
	left:167px;

in the css and remove it from my html

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.